------- Comment #1 from hjl dot tools at gmail dot com 2009-01-18 01:41 ------- 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 y.o bash-3.2$ ./a.out Aborted bash-3.2$ -- hjl dot tools at gmail dot com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ubizjak at gmail dot com Summary|gcc.dg/pr38616.c fails |__builtin_strcpy doesn't | |work with -fstack-protector http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38902