Bug 14307 - [tree-ssa][merge] ICE in copy_to_mode_reg (explow.c:675)
Summary: [tree-ssa][merge] ICE in copy_to_mode_reg (explow.c:675)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: tree-ssa
: P1 critical
Target Milestone: tree-ssa
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2004-02-26 15:37 UTC by Christian Ehrhardt
Modified: 2004-03-03 06:45 UTC (History)
2 users (show)

See Also:
Host: sparc-sun-solaris2.9
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2004-02-27 15:32:18


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Ehrhardt 2004-02-26 15:37:38 UTC
With Andrew's patch for 14272 I now get cc1plus ICEs in 64-Bit mode.
A reduced testcase is this, compile with -m64 -O0:

  struct locale
  {
    int i;
    ~locale();
  };
  struct basic_ios
  {
    locale getloc () const { }
  };
  void copyfmt(const basic_ios& __rhs)
  {
    __rhs.getloc();
  }

The error message is:

cc1plus -O0 -m64 -quiet io.cc
io.cc: In function `void copyfmt(const basic_ios&)':
io.cc:12: internal compiler error: in copy_to_mode_reg, at explow.c:675
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

   regards Christian
Comment 1 Diego Novillo 2004-02-26 15:50:10 UTC
Subject: Re:  New: [tree-ssa] ICE in copy_to_mode_reg
	(explow.c:675)

On Thu, 2004-02-26 at 10:37, ehrhardt at mathematik dot uni-ulm dot de
wrote:
> With Andrew's patch for 14272 I now get cc1plus ICEs in 64-Bit mode.
> A reduced testcase is this, compile with -m64 -O0:
> 
-O0?  Interesting.  Does this happen with a bootstrapped cc1plus?  We
don't run any of the tree-ssa passes at O0 yet.

Do you still get the error if you build cc1plus with the system
compiler?


Thanks.  Diego.

Comment 2 Andrew Pinski 2004-02-26 16:42:08 UTC
Does this code work on the mainline also?
Comment 3 Christian Ehrhardt 2004-02-26 16:46:30 UTC
Subject: Re:  [tree-ssa] ICE in copy_to_mode_reg (explow.c:675)

On Thu, Feb 26, 2004 at 03:50:12PM -0000, dnovillo at redhat dot com wrote:
> Do you still get the error if you build cc1plus with the system
> compiler?

If I compile a fresh non bootstrapped cc1plus with the host compiler
(gcc-3.2) it ICEs with and without Andrew's patch, i.e. these failures
are not related to Andrew's patch (as I already suggested in PR 14272).

   regards  Christian

Comment 4 Diego Novillo 2004-02-26 16:48:35 UTC
Subject: Re:  [tree-ssa] ICE in copy_to_mode_reg
	(explow.c:675)

On Thu, 2004-02-26 at 11:46, ehrhardt at mathematik dot uni-ulm dot de
wrote:
> ------- Additional Comments From ehrhardt at mathematik dot uni-ulm dot de  2004-02-26 16:46 -------
> Subject: Re:  [tree-ssa] ICE in copy_to_mode_reg (explow.c:675)
> 
> On Thu, Feb 26, 2004 at 03:50:12PM -0000, dnovillo at redhat dot com wrote:
> > Do you still get the error if you build cc1plus with the system
> > compiler?
> 
> If I compile a fresh non bootstrapped cc1plus with the host compiler
> (gcc-3.2) it ICEs with and without Andrew's patch, i.e. these failures
> are not related to Andrew's patch (as I already suggested in PR 14272).
> 
Then this may be a problem we inherited from mainline at the last
merge.  I'm working on another mainline merge.  I'll see if this makes
it go away.

If it doesn't, we may be having a gimplification problem.  At -O0, just
about the only thing we do is gimplify and expand into RTL.


Diego.

Comment 5 Christian Ehrhardt 2004-02-26 17:29:11 UTC
Subject: Re:  [tree-ssa] ICE in copy_to_mode_reg (explow.c:675)

On Thu, Feb 26, 2004 at 04:48:36PM -0000, dnovillo at redhat dot com wrote:
> Then this may be a problem we inherited from mainline at the last
> merge.  I'm working on another mainline merge.  I'll see if this makes
> it go away.

The following hunk introduced into mainline by Mark is probably going to
fix this bug. Will bootstrap now. It fixes the bug for the non-bootstrapped
compiler.

===================================================================
RCS file: /cvs/gcc/gcc/gcc/calls.c,v
retrieving revision 1.319
retrieving revision 1.320
diff -u -r1.319 -r1.320
--- gcc/gcc/calls.c	2004/02/06 06:18:11	1.319
+++ gcc/gcc/calls.c	2004/02/17 18:32:32	1.320
@@ -2385,7 +2388,8 @@
 		  || (ACCUMULATE_OUTGOING_ARGS
 		      && stack_arg_under_construction
 		      && structure_value_addr == virtual_outgoing_args_rtx)
-		  ? copy_addr_to_reg (structure_value_addr)
+		  ? copy_addr_to_reg (convert_memory_address 
+				      (Pmode, structure_value_addr))
 		  : structure_value_addr);
 
       actparms

Comment 6 Andrew Pinski 2004-02-27 15:32:17 UTC
Confirmed, waiting for a merge.
Comment 7 Steven Bosscher 2004-02-29 13:24:52 UTC
Can we not just commit this tiny hunk now instead of waiting for a merge? 
Comment 8 Andrew Pinski 2004-03-03 06:45:05 UTC
This should be fixed now by the merge which RTH did.