Bug 22384 - compiling cp-mangle.c causes an ICE
Summary: compiling cp-mangle.c causes an ICE
Status: RESOLVED DUPLICATE of bug 22239
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: unknown
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: build, ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2005-07-09 16:50 UTC by Kazu Hirata
Modified: 2005-07-23 22:49 UTC (History)
2 users (show)

See Also:
Host:
Target: arm-none-eabi
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kazu Hirata 2005-07-09 16:50:57 UTC
Consider:

struct d_print_mod
{
  int type;
  int dummy0;
  int dummy1;
};
struct d_print_info
{
  struct d_print_mod *modifiers;
}
d_print_comp (struct d_print_info *dpi, struct d_print_mod *pdpm, int a)
{
  struct d_print_mod adpm[4];
  unsigned int i = 0;
  dpi->modifiers = &adpm[0];
  while (pdpm->type)
    {
      if (a)
        {
          adpm[i] = *pdpm;
          ++i;
        }
    }
}

Compiling this with arm-none-eabi-gcc causes an ICE like so:

min.c: In function 'd_print_comp':
min.c:24: internal compiler error: in loop_givs_rescan, at loop.c:5517
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Reverting

http://gcc.gnu.org/ml/gcc-cvs/2005-07/msg00296.html

cures the problem.

Because of this problem, arm-none-eabi does not build currently.
Comment 1 dave 2005-07-09 17:02:37 UTC
Subject: Re:  New: compiling cp-mangle.c causes an ICE

> Reverting
> 
> http://gcc.gnu.org/ml/gcc-cvs/2005-07/msg00296.html
> 
> cures the problem.

But that breaks bootstrap on the PA.  Reverting

2005-04-16  Alexandre Oliva  <aoliva@redhat.com>

        PR target/20126
	* loop.c (loop_givs_rescan): Handle non-replaceable (plus (reg)
	(const)).

would probably fix the PA bootstrap.  But then PR 20126 would need to
be reopened.  This is a never ending serious of bugs for which we need
a proper fix.

I've posted a possible fix to gcc-patches:
<http://gcc.gnu.org/ml/gcc-patches/2005-07/msg00649.html>.  Does that
work for you?

Dave
Comment 2 kazu@codesourcery.com 2005-07-09 17:13:29 UTC
Subject: Re:  compiling cp-mangle.c causes an
 ICE

Hi Dave,

> I've posted a possible fix to gcc-patches:
> <http://gcc.gnu.org/ml/gcc-patches/2005-07/msg00649.html>.  Does that
> work for you?

Thank you for a quick reply.  Yes, your new patch fixes the ICE 
associated with the testcase.

Kazu Hirata
Comment 3 Andrew Pinski 2005-07-09 23:21:37 UTC

*** This bug has been marked as a duplicate of 22239 ***