public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/32399]  New: ICE in build2_stat, at tree.c:3074
@ 2007-06-19  6:24 marcus at jet dot franken dot de
  2007-06-19  6:24 ` [Bug c/32399] " marcus at jet dot franken dot de
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: marcus at jet dot franken dot de @ 2007-06-19  6:24 UTC (permalink / raw)
  To: gcc-bugs

new regression, likely caused by pointer-plus branch merge

extracted from Wine

/home/marcus/projects/gcc/BIN/bin/gcc -m32   -O2   -c vertexbuffer.i 
vertexbuffer.i: In function 'f':
vertexbuffer.i:1: internal compiler error: in build2_stat, at tree.c:3074


-- 
           Summary: ICE in build2_stat, at tree.c:3074
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: marcus at jet dot franken dot de
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug c/32399] ICE in build2_stat, at tree.c:3074
  2007-06-19  6:24 [Bug c/32399] New: ICE in build2_stat, at tree.c:3074 marcus at jet dot franken dot de
@ 2007-06-19  6:24 ` marcus at jet dot franken dot de
  2007-06-19  8:21 ` [Bug middle-end/32399] " pinskia at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: marcus at jet dot franken dot de @ 2007-06-19  6:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from marcus at jet dot franken dot de  2007-06-19 06:24 -------
Created an attachment (id=13734)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13734&action=view)
vertexbuffer.i

gcc -O2 -c vertexbuffer.i


-- 


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug middle-end/32399] ICE in build2_stat, at tree.c:3074
  2007-06-19  6:24 [Bug c/32399] New: ICE in build2_stat, at tree.c:3074 marcus at jet dot franken dot de
  2007-06-19  6:24 ` [Bug c/32399] " marcus at jet dot franken dot de
@ 2007-06-19  8:21 ` pinskia at gcc dot gnu dot org
  2007-06-19  8:27 ` [Bug middle-end/32399] [4.3 Regression] " pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-19  8:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2007-06-19 08:21 -------
This is IV-opts going funny I think as we get pointer+pointer (and yes real
pointer SSA_NAMES and no casts).


-- 


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug middle-end/32399] [4.3 Regression] ICE in build2_stat, at tree.c:3074
  2007-06-19  6:24 [Bug c/32399] New: ICE in build2_stat, at tree.c:3074 marcus at jet dot franken dot de
  2007-06-19  6:24 ` [Bug c/32399] " marcus at jet dot franken dot de
  2007-06-19  8:21 ` [Bug middle-end/32399] " pinskia at gcc dot gnu dot org
@ 2007-06-19  8:27 ` pinskia at gcc dot gnu dot org
  2007-06-19  9:17 ` rguenth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-19  8:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2007-06-19 08:26 -------
This code itself is very weird and I don't know if it is really defined or not.
We have basically:
char *f(char *a, char *b)
{
  return a + (int)b;
}

How can that even be defined.

Anyways the following fixes the problem:
Index: tree-ssa-address.c
===================================================================
--- tree-ssa-address.c  (revision 125776)
+++ tree-ssa-address.c  (working copy)
@@ -423,9 +423,9 @@

   /* Add ELT to base.  */
   type = TREE_TYPE (parts->base);
-  parts->base = fold_build2 (PLUS_EXPR, type,
+  parts->base = fold_build2 (POINTER_PLUS_EXPR, type,
                             parts->base,
-                            fold_convert (type, elt));
+                            fold_convert (sizetype, elt));
 }

 /* Finds the most expensive multiplication in ADDR that can be


Though I have not tested it at all.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2007-06-19 08:26:50
               date|                            |
            Summary|ICE in build2_stat, at      |[4.3 Regression] ICE in
                   |tree.c:3074                 |build2_stat, at tree.c:3074
   Target Milestone|---                         |4.3.0


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug middle-end/32399] [4.3 Regression] ICE in build2_stat, at tree.c:3074
  2007-06-19  6:24 [Bug c/32399] New: ICE in build2_stat, at tree.c:3074 marcus at jet dot franken dot de
                   ` (2 preceding siblings ...)
  2007-06-19  8:27 ` [Bug middle-end/32399] [4.3 Regression] " pinskia at gcc dot gnu dot org
@ 2007-06-19  9:17 ` rguenth at gcc dot gnu dot org
  2007-06-20 16:21 ` marcus at jet dot franken dot de
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-06-19  9:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2007-06-19 09:17 -------
The testcase indeed looks undefined (but valid).


-- 


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug middle-end/32399] [4.3 Regression] ICE in build2_stat, at tree.c:3074
  2007-06-19  6:24 [Bug c/32399] New: ICE in build2_stat, at tree.c:3074 marcus at jet dot franken dot de
                   ` (3 preceding siblings ...)
  2007-06-19  9:17 ` rguenth at gcc dot gnu dot org
@ 2007-06-20 16:21 ` marcus at jet dot franken dot de
  2007-06-21 23:11 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: marcus at jet dot franken dot de @ 2007-06-20 16:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from marcus at jet dot franken dot de  2007-06-20 16:21 -------
i have tested it and it works.

(i have also fixed the Wine code ;)


-- 


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug middle-end/32399] [4.3 Regression] ICE in build2_stat, at tree.c:3074
  2007-06-19  6:24 [Bug c/32399] New: ICE in build2_stat, at tree.c:3074 marcus at jet dot franken dot de
                   ` (4 preceding siblings ...)
  2007-06-20 16:21 ` marcus at jet dot franken dot de
@ 2007-06-21 23:11 ` pinskia at gcc dot gnu dot org
  2007-06-27 15:37 ` falk at debian dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-06-21 23:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2007-06-21 23:11 -------
Mine.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pinskia at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-06-19 08:26:50         |2007-06-21 23:11:26
               date|                            |


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug middle-end/32399] [4.3 Regression] ICE in build2_stat, at tree.c:3074
  2007-06-19  6:24 [Bug c/32399] New: ICE in build2_stat, at tree.c:3074 marcus at jet dot franken dot de
                   ` (5 preceding siblings ...)
  2007-06-21 23:11 ` pinskia at gcc dot gnu dot org
@ 2007-06-27 15:37 ` falk at debian dot org
  2007-06-27 15:41 ` pinskia at gmail dot com
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: falk at debian dot org @ 2007-06-27 15:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from falk at debian dot org  2007-06-27 15:37 -------
This makes bootstrap fail on alphaev68-linux:

/src/gcc-2007.06.27/build/./gcc/xgcc -B/src/gcc-2007.06.27/build/./gcc/
-B/usr/local/alphaev68-unknown-linux-gnu/bin/
-B/usr/local/alphaev68-unknown-linux-gnu/lib/ -isystem
/usr/local/alphaev68-unknown-linux-gnu/include -isystem
/usr/local/alphaev68-unknown-linux-gnu/sys-include -g -fkeep-inline-functions
-O2  -O2 -g -O2  -mieee -DIN_GCC    -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem
./include  -fPIC -mieee -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED   -I. -I. -I../.././gcc -I../../../libgcc
-I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include  -o
_gcov_execl.o -MT _gcov_execl.o -MD -MP -MF _gcov_execl.dep -DL_gcov_execl -c
../../../libgcc/../gcc/libgcov.c
../../../libgcc/../gcc/libgcov.c: In function '__gcov_execl':
../../../libgcc/../gcc/libgcov.c:838: internal compiler error: in build2_stat,
at tree.c:3074
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[3]: *** [_gcov_execl.o] Error 1
make[3]: Leaving directory
`/src/gcc-2007.06.27/build/alphaev68-unknown-linux-gnu/libgcc'

This happens as soon as varargs are used:

$ cat test.c                                                                   
void f(int x, ...) {
    __builtin_va_list ap;
    __builtin_va_start(ap, x);
}
$ /src/gcc-2007.06.27/build/gcc/xgcc -B/src/gcc-2007.06.27/build/gcc/ -c test.c
test.c: In function 'f':
test.c:3: internal compiler error: in build2_stat, at tree.c:3074
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


-- 


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug middle-end/32399] [4.3 Regression] ICE in build2_stat, at tree.c:3074
  2007-06-19  6:24 [Bug c/32399] New: ICE in build2_stat, at tree.c:3074 marcus at jet dot franken dot de
                   ` (6 preceding siblings ...)
  2007-06-27 15:37 ` falk at debian dot org
@ 2007-06-27 15:41 ` pinskia at gmail dot com
  2007-06-29 18:50 ` mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gmail dot com @ 2007-06-27 15:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gmail dot com  2007-06-27 15:41 -------
Subject: Re:  [4.3 Regression] ICE in build2_stat, at tree.c:3074

On 27 Jun 2007 15:37:26 -0000, falk at debian dot org
<gcc-bugzilla@gcc.gnu.org> wrote:
>
>
> ------- Comment #7 from falk at debian dot org  2007-06-27 15:37 -------
> This makes bootstrap fail on alphaev68-linux:

This is a different bug, related to the alpha backend was not fix up
for pointer plus.
Please file seperately.

Thanks,
Andrew Pinski


-- 


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug middle-end/32399] [4.3 Regression] ICE in build2_stat, at tree.c:3074
  2007-06-19  6:24 [Bug c/32399] New: ICE in build2_stat, at tree.c:3074 marcus at jet dot franken dot de
                   ` (7 preceding siblings ...)
  2007-06-27 15:41 ` pinskia at gmail dot com
@ 2007-06-29 18:50 ` mmitchel at gcc dot gnu dot org
  2007-08-03 19:32 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-06-29 18:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from mmitchel at gcc dot gnu dot org  2007-06-29 18:49 -------
Andrew, do you want to convert to sizetype or to ptrdiff_t?  Does it matter?


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug middle-end/32399] [4.3 Regression] ICE in build2_stat, at tree.c:3074
  2007-06-19  6:24 [Bug c/32399] New: ICE in build2_stat, at tree.c:3074 marcus at jet dot franken dot de
                   ` (8 preceding siblings ...)
  2007-06-29 18:50 ` mmitchel at gcc dot gnu dot org
@ 2007-08-03 19:32 ` pinskia at gcc dot gnu dot org
  2007-08-04  0:33 ` pinskia at gcc dot gnu dot org
  2007-08-04  0:35 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-03 19:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from pinskia at gcc dot gnu dot org  2007-08-03 19:31 -------
(In reply to comment #9)
> Andrew, do you want to convert to sizetype or to ptrdiff_t?  Does it matter?

sizetype is correct for POINTER_PLUS_EXPR.  We don't have a ptrdiff_t
internally inside GCC as far as I know, only ssizetype (the signed version of
sizetype).

I am testing this patch right now and should be done in about 2 hours.


-- 


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug middle-end/32399] [4.3 Regression] ICE in build2_stat, at tree.c:3074
  2007-06-19  6:24 [Bug c/32399] New: ICE in build2_stat, at tree.c:3074 marcus at jet dot franken dot de
                   ` (9 preceding siblings ...)
  2007-08-03 19:32 ` pinskia at gcc dot gnu dot org
@ 2007-08-04  0:33 ` pinskia at gcc dot gnu dot org
  2007-08-04  0:35 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-04  0:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from pinskia at gcc dot gnu dot org  2007-08-04 00:33 -------
Subject: Bug 32399

Author: pinskia
Date: Sat Aug  4 00:33:31 2007
New Revision: 127196

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127196
Log:
2007-08-03  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR middle-end/32399
        * tree-ssa-address.c (add_to_parts): Use POINTER_PLUS_EXPR
        when adding to the base and convert ELT to sizetype instead of type.

2007-08-03  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        RP middle-end/32399
        * gcc.c-torture/compile/pr32399.c: New testcase.


Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr32399.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-address.c


-- 


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug middle-end/32399] [4.3 Regression] ICE in build2_stat, at tree.c:3074
  2007-06-19  6:24 [Bug c/32399] New: ICE in build2_stat, at tree.c:3074 marcus at jet dot franken dot de
                   ` (10 preceding siblings ...)
  2007-08-04  0:33 ` pinskia at gcc dot gnu dot org
@ 2007-08-04  0:35 ` pinskia at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-04  0:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from pinskia at gcc dot gnu dot org  2007-08-04 00:35 -------
Fixed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-08-04  0:35 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-19  6:24 [Bug c/32399] New: ICE in build2_stat, at tree.c:3074 marcus at jet dot franken dot de
2007-06-19  6:24 ` [Bug c/32399] " marcus at jet dot franken dot de
2007-06-19  8:21 ` [Bug middle-end/32399] " pinskia at gcc dot gnu dot org
2007-06-19  8:27 ` [Bug middle-end/32399] [4.3 Regression] " pinskia at gcc dot gnu dot org
2007-06-19  9:17 ` rguenth at gcc dot gnu dot org
2007-06-20 16:21 ` marcus at jet dot franken dot de
2007-06-21 23:11 ` pinskia at gcc dot gnu dot org
2007-06-27 15:37 ` falk at debian dot org
2007-06-27 15:41 ` pinskia at gmail dot com
2007-06-29 18:50 ` mmitchel at gcc dot gnu dot org
2007-08-03 19:32 ` pinskia at gcc dot gnu dot org
2007-08-04  0:33 ` pinskia at gcc dot gnu dot org
2007-08-04  0:35 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).