Hi,
When compiling the following program without the -g parameter, the run result is -1. After the -g parameter is added, the run result is reported as a Segment Fault. Perhaps intelc has some optimizations by default. Is this a correct behavior for intel c complier?
TestCase:
#include<stdio.h>
#include<string.h>
int has_8bit(int i)
{
return strcmp(i, "none");
}
int main(void){
int NISLParameter0 = -4569;
int NISLParameter1 = has_8bit(NISLParameter0);
printf("%d",NISLParameter1);
return 0;
}
The OS is:
Linux version 4.15.0-65-generic
Compiler Version:
icc (ICC) 19.0.4.243 20190416
TCE Open Date:
Monday, January 13, 2020 - 19:11