public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/41935] New: ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301
@ 2009-11-04 7:28 linuxl4 at sohu dot com
2009-11-04 7:29 ` [Bug middle-end/41935] " linuxl4 at sohu dot com
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: linuxl4 at sohu dot com @ 2009-11-04 7:28 UTC (permalink / raw)
To: gcc-bugs
$gcc -v
gcc version 4.4.3 20091104 (prerelease) (GCC)
$gcc -c pid.c
kernel/pid.c: In function 'find_pid_ns':
kernel/pid.c:299: internal compiler error: tree check: expected integer_cst,
have nop_expr in int_cst_value, at tree.c:8301
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: ICE : tree check: expected integer_cst, have nop_expr in
int_cst_value, at tree.c:8301
Product: gcc
Version: 4.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: linuxl4 at sohu dot com
GCC build triplet: x86_64-pc-linux
GCC host triplet: x86_64-pc-linux
GCC target triplet: x86_64-pc-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/41935] ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301
2009-11-04 7:28 [Bug middle-end/41935] New: ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301 linuxl4 at sohu dot com
@ 2009-11-04 7:29 ` linuxl4 at sohu dot com
2009-11-04 9:28 ` jakub at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: linuxl4 at sohu dot com @ 2009-11-04 7:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from linuxl4 at sohu dot com 2009-11-04 07:29 -------
Created an attachment (id=18961)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18961&action=view)
the source
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/41935] ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301
2009-11-04 7:28 [Bug middle-end/41935] New: ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301 linuxl4 at sohu dot com
2009-11-04 7:29 ` [Bug middle-end/41935] " linuxl4 at sohu dot com
@ 2009-11-04 9:28 ` jakub at gcc dot gnu dot org
2009-11-04 9:35 ` jakub at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-11-04 9:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jakub at gcc dot gnu dot org 2009-11-04 09:27 -------
Seems to be caused by the PR38699 changes. Looking into it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/41935] ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301
2009-11-04 7:28 [Bug middle-end/41935] New: ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301 linuxl4 at sohu dot com
2009-11-04 7:29 ` [Bug middle-end/41935] " linuxl4 at sohu dot com
2009-11-04 9:28 ` jakub at gcc dot gnu dot org
@ 2009-11-04 9:35 ` jakub at gcc dot gnu dot org
2009-11-04 10:37 ` jakub at gcc dot gnu dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-11-04 9:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jakub at gcc dot gnu dot org 2009-11-04 09:35 -------
Shorter testcase:
/* PR middle-end/41935 */
extern void abort (void);
struct A { int a; int b[10]; };
int
foo (struct A *p)
{
return __builtin_offsetof (struct A, b[p->a]);
}
int
main ()
{
struct A a;
a.a = 7;
if (foo (&a) != 7 * sizeof (int) + __builtin_offsetof (struct A, b))
abort ();
a.a = 2;
if (foo (&a) != 2 * sizeof (int) + __builtin_offsetof (struct A, b))
abort ();
return 0;
}
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-11-04 09:35:32
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/41935] ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301
2009-11-04 7:28 [Bug middle-end/41935] New: ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301 linuxl4 at sohu dot com
` (2 preceding siblings ...)
2009-11-04 9:35 ` jakub at gcc dot gnu dot org
@ 2009-11-04 10:37 ` jakub at gcc dot gnu dot org
2009-11-06 8:34 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-11-04 10:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2009-11-04 10:37 -------
Created an attachment (id=18962)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18962&action=view)
gcc45-pr41935.patch
Patch I'm going to bootstrap/regtest.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/41935] ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301
2009-11-04 7:28 [Bug middle-end/41935] New: ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301 linuxl4 at sohu dot com
` (3 preceding siblings ...)
2009-11-04 10:37 ` jakub at gcc dot gnu dot org
@ 2009-11-06 8:34 ` pinskia at gcc dot gnu dot org
2009-11-06 8:41 ` [Bug c/41935] [4.4/4.5 Regression] " pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-11-06 8:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2009-11-06 08:33 -------
*** Bug 41945 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jengelh at medozas dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/41935] [4.4/4.5 Regression] ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301
2009-11-04 7:28 [Bug middle-end/41935] New: ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301 linuxl4 at sohu dot com
` (4 preceding siblings ...)
2009-11-06 8:34 ` pinskia at gcc dot gnu dot org
@ 2009-11-06 8:41 ` pinskia at gcc dot gnu dot org
2009-11-06 8:47 ` jakub at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-11-06 8:41 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Severity|normal |critical
Component|middle-end |c
Keywords| |ice-on-valid-code
Summary|ICE : tree check: expected |[4.4/4.5 Regression] ICE :
|integer_cst, have nop_expr |tree check: expected
|in int_cst_value, at |integer_cst, have nop_expr
|tree.c:8301 |in int_cst_value, at
| |tree.c:8301
Target Milestone|--- |4.4.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/41935] [4.4/4.5 Regression] ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301
2009-11-04 7:28 [Bug middle-end/41935] New: ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301 linuxl4 at sohu dot com
` (5 preceding siblings ...)
2009-11-06 8:41 ` [Bug c/41935] [4.4/4.5 Regression] " pinskia at gcc dot gnu dot org
@ 2009-11-06 8:47 ` jakub at gcc dot gnu dot org
2009-11-06 9:22 ` jakub at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-11-06 8:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jakub at gcc dot gnu dot org 2009-11-06 08:46 -------
Subject: Bug 41935
Author: jakub
Date: Fri Nov 6 08:46:45 2009
New Revision: 153962
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153962
Log:
PR middle-end/41935
* c-common.c (fold_offsetof_1) <case ARRAY_REF>: Don't crash for VLAs
or non-constant index, allow index one past the last element and
allow exceeding array bound in arrays that might be used as flexible
array members.
* gcc.dg/pr41935.c: New test.
* c-c++-common/pr41935.c: New test.
* c-c++-common/builtin-offsetof.c (f0): Allow index one past the last
element.
* gcc.c-torture/execute/pr41935.c: New test.
Added:
trunk/gcc/testsuite/c-c++-common/pr41935.c
trunk/gcc/testsuite/gcc.c-torture/execute/pr41935.c
trunk/gcc/testsuite/gcc.dg/pr41935.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-common.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/c-c++-common/builtin-offsetof.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/41935] [4.4/4.5 Regression] ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301
2009-11-04 7:28 [Bug middle-end/41935] New: ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301 linuxl4 at sohu dot com
` (6 preceding siblings ...)
2009-11-06 8:47 ` jakub at gcc dot gnu dot org
@ 2009-11-06 9:22 ` jakub at gcc dot gnu dot org
2009-11-06 12:42 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-11-06 9:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jakub at gcc dot gnu dot org 2009-11-06 09:22 -------
Fixed. On the 4.4 branch by
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=153944
- partial reversion of the patch that introduced this problem.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/41935] [4.4/4.5 Regression] ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301
2009-11-04 7:28 [Bug middle-end/41935] New: ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301 linuxl4 at sohu dot com
` (7 preceding siblings ...)
2009-11-06 9:22 ` jakub at gcc dot gnu dot org
@ 2009-11-06 12:42 ` jakub at gcc dot gnu dot org
2009-11-06 22:51 ` rguenth at gcc dot gnu dot org
2009-11-20 14:52 ` hjl at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-11-06 12:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jakub at gcc dot gnu dot org 2009-11-06 12:42 -------
*** Bug 41968 has been marked as a duplicate of this bug. ***
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dcb314 at hotmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/41935] [4.4/4.5 Regression] ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301
2009-11-04 7:28 [Bug middle-end/41935] New: ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301 linuxl4 at sohu dot com
` (8 preceding siblings ...)
2009-11-06 12:42 ` jakub at gcc dot gnu dot org
@ 2009-11-06 22:51 ` rguenth at gcc dot gnu dot org
2009-11-20 14:52 ` hjl at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-11-06 22:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from rguenth at gcc dot gnu dot org 2009-11-06 22:51 -------
*** Bug 41955 has been marked as a duplicate of this bug. ***
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |chris2553 at googlemail dot
| |com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41935
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c/41935] [4.4/4.5 Regression] ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301
2009-11-04 7:28 [Bug middle-end/41935] New: ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301 linuxl4 at sohu dot com
` (9 preceding siblings ...)
2009-11-06 22:51 ` rguenth at gcc dot gnu dot org
@ 2009-11-20 14:52 ` hjl at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: hjl at gcc dot gnu dot org @ 2009-11-20 14:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from hjl at gcc dot gnu dot org 2009-11-20 14:50 -------
Subject: Bug 41935
Author: hjl
Date: Fri Nov 20 14:49:22 2009
New Revision: 154366
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154366
Log:
2009-11-20 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline:
2009-11-18 Alexandre Oliva <aoliva@redhat.com>
PR debug/41926
* gcc.dg/vect/vect-debug-pr41926.c: New.
2009-11-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/42055
* g++.dg/template/crash92.C: New.
2009-11-08 Richard Guenther <rguenther@suse.de>
PR rtl-optimization/41928
* gfortran.dg/pr41928.f90: New testcase.
2009-11-06 Jakub Jelinek <jakub@redhat.com>
PR middle-end/41935
* gcc.dg/pr41935.c: New test.
* c-c++-common/pr41935.c: New test.
* gcc.c-torture/execute/pr41935.c: New test.
2009-11-04 Richard Guenther <rguenther@suse.de>
PR tree-optimization/41919
* gcc.c-torture/execute/pr41919.c: New testcase.
2009-11-03 Tobias Burnus <burnus@net-b.de>
PR fortran/41907
* gfortran.dg/missing_optional_dummy_6.f90: New test.
2009-11-02 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/41750
* gcc.c-torture/execute/pr41750.c: New test.
2009-11-02 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/41841
* gcc.dg/pr41841.c: New test.
Added:
branches/gcc-4_4-branch/gcc/testsuite/c-c++-common/pr41935.c
- copied unchanged from r154365,
trunk/gcc/testsuite/c-c++-common/pr41935.c
branches/gcc-4_4-branch/gcc/testsuite/g++.dg/template/crash92.C
- copied unchanged from r154365,
trunk/gcc/testsuite/g++.dg/template/crash92.C
branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/execute/pr41750.c
- copied unchanged from r154365,
trunk/gcc/testsuite/gcc.c-torture/execute/pr41750.c
branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/execute/pr41919.c
- copied unchanged from r154365,
trunk/gcc/testsuite/gcc.c-torture/execute/pr41919.c
branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/execute/pr41935.c
- copied unchanged from r154365,
trunk/gcc/testsuite/gcc.c-torture/execute/pr41935.c
branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr41841.c
- copied unchanged from r154365, trunk/gcc/testsuite/gcc.dg/pr41841.c
branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr41935.c
- copied unchanged from r154365, trunk/gcc/testsuite/gcc.dg/pr41935.c
branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/vect/vect-debug-pr41926.c
- copied unchanged from r154365,
trunk/gcc/testsuite/gcc.dg/vect/vect-debug-pr41926.c
branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/missing_optional_dummy_6.f90
- copied unchanged from r154365,
trunk/gcc/testsuite/gfortran.dg/missing_optional_dummy_6.f90
branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/pr41928.f90
- copied unchanged from r154365,
trunk/gcc/testsuite/gfortran.dg/pr41928.f90
Modified:
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41935
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2009-11-20 14:52 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-04 7:28 [Bug middle-end/41935] New: ICE : tree check: expected integer_cst, have nop_expr in int_cst_value, at tree.c:8301 linuxl4 at sohu dot com
2009-11-04 7:29 ` [Bug middle-end/41935] " linuxl4 at sohu dot com
2009-11-04 9:28 ` jakub at gcc dot gnu dot org
2009-11-04 9:35 ` jakub at gcc dot gnu dot org
2009-11-04 10:37 ` jakub at gcc dot gnu dot org
2009-11-06 8:34 ` pinskia at gcc dot gnu dot org
2009-11-06 8:41 ` [Bug c/41935] [4.4/4.5 Regression] " pinskia at gcc dot gnu dot org
2009-11-06 8:47 ` jakub at gcc dot gnu dot org
2009-11-06 9:22 ` jakub at gcc dot gnu dot org
2009-11-06 12:42 ` jakub at gcc dot gnu dot org
2009-11-06 22:51 ` rguenth at gcc dot gnu dot org
2009-11-20 14:52 ` hjl 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).