http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47540
Summary: ARM THUMB crash with complex numbers Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: i...@airs.com When I compile this C code with -O2 -mthumb on a current mainline compiler configured for arm-rtems4.11, it crashes. extern double f1 (_Complex double); extern _Complex double f2 (_Complex double); _Complex double f (_Complex double x) { return f1 (x) == 0 ? 0 : f2 (x); } > gcc/xgcc -Bgcc/ -c -O2 -mthumb foo.c foo.c: In function 'f': foo.c:3:1: internal compiler error: in find_valid_class, at reload.c:710 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. The error is the gcc_assert at the end of find_valid_class. This code compiles OK on x86 and on ARM when not using -mthumb.