Bug 17810 - [3.4 Regression] internal compiler error: in verify_local_live_at_start for arm-rtems, arm-linux
Summary: [3.4 Regression] internal compiler error: in verify_local_live_at_start for a...
Status: RESOLVED DUPLICATE of bug 15342
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 3.4.2
: P2 normal
Target Milestone: 3.4.5
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 28805 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-03 13:54 UTC by Pavel Pisa
Modified: 2006-08-22 15:17 UTC (History)
8 users (show)

See Also:
Host:
Target: arm-linux
Build:
Known to work: 3.2.3 3.3.4 4.0.0 3.4.5
Known to fail: 3.4.2 3.4.3 3.4.4
Last reconfirmed: 2004-12-06 23:53:41


Attachments
partially simplified test case (884 bytes, text/plain)
2004-10-03 13:59 UTC, Pavel Pisa
Details
reduced testcase from xfree86-4.5.0 (419 bytes, text/plain)
2005-05-20 18:07 UTC, dank
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Pisa 2004-10-03 13:54:20 UTC
The internal compiler bug on legal code similar to bug 15342.
This bug manifest itself on specific combination of two functions
accessing structure fields and containing more return paths.
If one of the functions is moved into separate file, error seems
to disappear.

arm-linux-gcc --pipe -B/opt/rtems/arm-rtems/csb336/lib/  \
-mcpu=arm920 -mstructure-size-boundary=8 -msoft-float \
-g -Wall  -O3 -g \
-o icetest1.o \
-c icetest1.c

icetest1.c: In function `sui_get_event':
icetest1.c:172: internal compiler error: in verify_local_live_at_start, at
flow.c:546
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


Experienced on next x86 to ARM GCC builds

GCC 3.4.1 and GCC 3.4.2
./configure --target=arm-rtems --prefix=/usr --with-cpu=arm9 \
  --enable-languages=c,c++ --with-gnu-ld --with-float=soft \
  --enable-threads=rtems --enable-target-optspace --verbose  \
  --disable-nls --host=i586-pc-linux-gnu --with-newlib
Thread model: rtems
gcc version 3.4.2

GCC 3.4.1
./configure --target=arm-linux --prefix=/usr --with-cpu=arm9 \
--enable-languages=c,c++ --with-gnu-ld --enable-shared --enable-symvers=gnu \
--with-float=soft --enable-threads=posix --enable-__cxa_atexit \
--enable-target-optspace --verbose --disable-nls --host=i586-pc-linux-gnu \
--with-headers=/usr/src/linux-2.6.8-rc1-arm/include
Thread model: posix
gcc version 3.4.1

Attached reprocessed sources length reduced form original 3150 lines
to 173 lines. More attempt to simplify code even more lead to compilation
without errors.
Comment 1 Pavel Pisa 2004-10-03 13:59:08 UTC
Created attachment 7270 [details]
partially simplified test case

arm-linux-gcc -mcpu=arm920 -msoft-float -g -Wall  -O3 -g -o icetest1.o -c
icetest1.c

or 

arm-rtems-gcc -mcpu=arm920 -msoft-float -g -Wall  -O3 -g -o icetest1.o -c
icetest1.c
Comment 2 Serge Belyshev 2004-12-06 23:53:41 UTC
/* slightly reduced testcase, use '-mcpu=arm920 -O3' */

struct sui_event;

typedef struct sui_event
{
  unsigned short what;
  int abrakadabra [3];
} sui_event_t;

static sui_event_t sui_event_buf;
static sui_event_t sui_global_event_buf;

short draw_request;

int
sui_get_uid_event ()
{
  int rc;

  if (rc < 0)
      return rc;
  return 0;
}

int
sui_get_event (sui_event_t *event, int k)
{

  if (k != 0)
    {
      *event = sui_event_buf;
      sui_event_buf.what = 0;
      return 0;
    }
  
  if (sui_global_event_buf.what != 0)
    {
      *event = sui_global_event_buf;
      return 0;
    }

  memset (event, 0, sizeof (sui_event_t));
  
  if (sui_get_uid_event () > 0)
    return 1;

  if (draw_request)
    {
      draw_request = 0;
      return 1;
    }

  return 0;
}
Comment 3 Joel Sherrill 2005-02-01 19:13:18 UTC
Neither icetest1 nor the reduced test case fails with gcc 4.0.0 20050124 when
targeting arm-rtems4.7.
Comment 4 Lennert Buytenhek 2005-03-11 12:44:46 UTC
Seeing the same bug with gcc 3.4.2 on armv4b when compiling x.org 6.8.1.
This does not happen with gcc 3.3.4.

slicer.cc: In function `void triangulateRect(Arc*, Backend&, int, int, int)':
slicer.cc:382: internal compiler error: in verify_local_live_at_start, at flow.c:546

Comment 5 dank 2005-05-20 18:05:13 UTC
http://sources.redhat.com/ml/crossgcc/2005-05/msg00154.html
is a report of a similar problem with
gcc-3.4.3.  xfree86-4.5.0's fontutils.c causes an ICE when 
compiled with -O3 -fno-strict-aliasing.  Backing down to xfree86-4.4.0,
or using -O2, or not using -no-strict-aliasing, or using gcc-4.0.0,
makes the problem go away.  I'll attach a reduced testcase.
To reproduce, do
$ arm-unknown-linux-gnu-gcc -O3 -fno-strict-aliasing   -c fontutils.i
Error is
fontutils.i:44: internal compiler error: in verify_local_live_at_start, at
flow.c:546

Is this the same problem, or should I file a new report?
Comment 6 dank 2005-05-20 18:07:14 UTC
Created attachment 8940 [details]
reduced testcase from xfree86-4.5.0
Comment 7 GCC Commits 2005-09-01 13:09:25 UTC
Subject: Bug 17810

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	rearnsha@gcc.gnu.org	2005-09-01 13:09:08

Modified files:
	gcc            : ChangeLog regrename.c 

Log message:
	PR rtl-optimization/17810
	Backport
	2004-11-04  Richard Sandiford  <rsandifo@redhat.com>
	PR target/15342
	* regrename.c (scan_rtx): Treat the destinations of SETs and CLOBBERs
	as OP_INOUT if the instruction is predicated.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.910&r2=2.2326.2.911
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/regrename.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.73.2.1&r2=1.73.2.2

Comment 8 Richard Earnshaw 2005-09-01 13:13:50 UTC
Really a dup of 15342.  Fixed for 3.4.5

*** This bug has been marked as a duplicate of 15342 ***
Comment 9 GCC Commits 2005-09-01 14:54:47 UTC
Subject: Bug 17810

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	rearnsha@gcc.gnu.org	2005-09-01 14:54:24

Modified files:
	gcc            : ChangeLog regrename.c 

Log message:
	PR rtl-optimization/17810 target/15342
	* regrename.c: Fix polluted patch in previous change.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.911&r2=2.2326.2.912
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/regrename.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.73.2.2&r2=1.73.2.3

Comment 10 hvreddy1110 2006-08-22 14:28:31 UTC
Hi,
I used and Xfree86-4.4 and 4.5 with gcc-3.4.3
But both the time it is giving same problem as

slicer.cc: In function `void triangulateRect(Arc*, Backend&, int, int, int)':
slicer.cc:382: internal compiler error: in verify_local_live_at_start, at flow.c:546
What could be the problem.

Thanks

Regards,
Harsha



(In reply to comment #5)
> http://sources.redhat.com/ml/crossgcc/2005-05/msg00154.html
> is a report of a similar problem with
> gcc-3.4.3.  xfree86-4.5.0's fontutils.c causes an ICE when 
> compiled with -O3 -fno-strict-aliasing.  Backing down to xfree86-4.4.0,
> or using -O2, or not using -no-strict-aliasing, or using gcc-4.0.0,
> makes the problem go away.  I'll attach a reduced testcase.
> To reproduce, do
> $ arm-unknown-linux-gnu-gcc -O3 -fno-strict-aliasing   -c fontutils.i
> Error is
> fontutils.i:44: internal compiler error: in verify_local_live_at_start, at
> flow.c:546
> 
> Is this the same problem, or should I file a new report?

Comment 11 Andrew Pinski 2006-08-22 15:17:07 UTC
*** Bug 28805 has been marked as a duplicate of this bug. ***