This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/25160] New: ICE in print_operand if using -mfloat-gprs w/ non-854x -mcpu option

void foo(double a) {}
-mfloat-gprs=double -mcpu=common ~/t.c
/home/ryan/t.c: In function 'foo':
/home/ryan/t.c:1: internal compiler error: in print_operand, at
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:> for instructions.

Using built-in specs.
Target: powerpc-linux-gnuspe
Configured with:
--target=powerpc-linux-gnuspe --host=i686-host_pc-linux-gnu
--disable-multilib --with-newlib --without-headers --disable-nls
--enable-threads=no --enable-symvers=gnu --enable-__cxa_atexit
--enable-languages=c --disable-shared
Thread model: single
gcc version 4.2.0 20051129 (experimental)

According to the documentation, -mfloat-gprs is only available on the
MPC8540/MPC8548. So should there be a check like the following? 

Index: rs6000.c
--- rs6000.c    (revision 107671)
+++ rs6000.c    (working copy)
@@ -1789,6 +1789,8 @@

     case OPT_mfloat_gprs_:
       rs6000_explicit_options.float_gprs = true;
+      if (rs6000_cpu != PROCESSOR_PPC8540)
+         error ("unsupported architecture for -mfloat-gprs");
       if (! strcmp (arg, "yes") || ! strcmp (arg, "single"))
        rs6000_float_gprs = 1;
       else if (! strcmp (arg, "double"))

Also, I have another test case which may* cause an ICE in extract_insn, at
recog.c when using -mfloat-gprs=double and -mcpu=common. Since they are caused
by the same invalid combination of switches, should I open a PR for it or will
this one suffice?

*I found the ICE on the e500 branch. The test case is in C++ so I haven't have
time to build powerpc-linux-gnuspe-g++ from the head yet.

           Summary: ICE in print_operand if using -mfloat-gprs w/ non-854x
                    -mcpu option
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rmansfield at qnx dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-host_pc-linux-gnu
GCC target triplet: powerpc-linux-gnuspe

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]