------- Comment #2 from hjl dot tools at gmail dot com 2009-01-18 01:43 ------- bash-3.2$ cat /tmp/x.c extern void abort ();
int foo (const char *, const char *); int main (void) { char buffer[1024]=""; __builtin_strcpy (buffer, "1234567890abcdefghijklmno"); if (foo (buffer, "1234567890abcdefghijklmno")) abort (); } bash-3.2$ cat /tmp/y.c int foo (const char *x , const char * y) { return __builtin_strcmp (x, y); } bash-3.2$ ./xgcc -B./ -O2 -m32 -c /tmp/y.c bash-3.2$ ./xgcc -B./ -O2 -m32 -O2 -fstack-protector /tmp/x.c -c bash-3.2$ ./xgcc -B./ -m32 x.o y.o bash-3.2$ ./a.out Aborted bash-3.2$ -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38902