This is the mail archive of the gcc-bugs@gcc.gnu.org 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/13186] New: [PPC] Internal compiler error in reload.c


The following mail contains a patch which not working on ppc-elf:
http://gcc.gnu.org/ml/gcc-patches/2003-11/msg00086.html

Release:
GCC 3.4 (20031124)

How-To-Repeat:
ppc-elf-gcc -O -c foo.c

C code (foo.c):
int foo(int ch) {
  union {
    double d;
  } b;
  if (ch) b.d = 0;
  if (b.d == 0) return 1;
  return 0;
}

Error msg.:
foo.c: In function `foo':
foo.c:15: error: insn does not satisfy its constraints:
(insn 56 44 54 0 (set (reg/v:DI 13 [orig:120 b ] [120])
        (const_int 0 [0x0])) 338 {*movdi_internal32} (nil)
    (nil))
foo.c:15: internal compiler error: in reload_cse_simplify_operands, at
postreload.c:378

The problematic segment of the patch:
--- reload.c	30 Oct 2003 01:40:48 -0000	1.222
+++ reload.c	1 Nov 2003 13:54:21 -0000
@@ -3369,6 +3370,11 @@ find_reloads (rtx insn, int replace, int
 		  const_to_mem = 1;
 		  if (this_alternative[i] != (int) NO_REGS)
 		    losers++;
+
+		  /* If constant pool symbols are not valid addresses,
+		     count an extra reload for the address.  */
+		  if (!targetm.direct_pool_load_p (operand_mode[i]))
+		    losers++;
 		}
 
 	      /* If we can't reload this value at all, reject this

-- 
           Summary: [PPC] Internal compiler error in reload.c
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: loki at inf dot u-szeged dot hu
                CC: gcc-bugs at gcc dot gnu dot org,rsandifo at redhat dot
                    com
GCC target triplet: ppc-elf


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13186


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