g++ -g -Wall -fPIC -O2 -funroll-loops -o /dev/null -c disk.cpp disk.cpp: In function 'char* test(const char*, const char*)': disk.cpp:13: error: unrecognizable insn: (insn 542 541 544 26 (set (reg/f:SI 84) (plus:SI (reg:SI 12 %r12) (const:SI (plus:SI (unspec:SI [ (symbol_ref:SI ("_ZZ4testPKcS0_E8rtn_path") [flags 0x2] <var_decl 0x77db29a0 rtn_path>) ] 112) (const_int 1024 [0x400]))))) -1 (nil) (nil)) disk.cpp:13: internal compiler error: in extract_insn, at recog.c:2084
Code: char *test(const char *parent, const char *child) { static char rtn_path[1024]; char *s = rtn_path; char *s_end = rtn_path + sizeof(rtn_path); const char *s2 = child; while( *s != '\0' ) s++; while( (s < s_end) && (*s2 != '\0') ) *s++ = *s2++; return(rtn_path); } -- Summary: unrecognizable insn with -fPIC -O2 -funroll-loops Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: waldi at debian dot org GCC target triplet: s390-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24367