http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56890
Bug #: 56890 Summary: Invalid fdtox %f8, %f9 on Sparc 64 Bits with -O2 Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: rainer.j...@kippdata.de Created attachment 29835 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29835 Minimal test case (only for -O2) gcc 4.7.2 config.nice: Will attach minimal C test case and assembler file. GCC flags: gcc -m64 -O2 Error message: /usr/ccs/bin/as: "test.s", line 29: error: invalid (misaligned) register Problematic assembler line: fdtox %f8, %f9 Sun assembler version: /usr/ccs/bin/as: SunOS 5.10 118683-08 Patch 07/05/2012 It seems the second argument needs an even register number. Another reporter also ran into the problem with GCC 4.6.3, but this works here, so maybe a problem with one of the helper libraries mpc, gmp, mpfr? Bug also reported for FreeBSD/sparc64. A slightly bigger test case closer to the original code (also attached) also gives an error when compiling only with "-O" or "-O1" instead of "-O2": test.c: In function 'buggy': test.c:13:1: error: insn does not satisfy its constraints: (insn 103 38 39 3 (set (reg:HI 40 %f8 [151]) (reg:HI 42 %f10)) test.c:6 58 {*movhi_insn} (nil)) test.c:13:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:403 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Original bug report was against the Apache Web Server: https://issues.apache.org/bugzilla/show_bug.cgi?id=52900 Regards, Rainer