This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/25682] [4.0/4.1/4.2 Regression] ICE when using old sytle offsetof (with non zero start) as array size
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jan 2006 10:00:12 -0000
- Subject: [Bug c/25682] [4.0/4.1/4.2 Regression] ICE when using old sytle offsetof (with non zero start) as array size
- References: <bug-25682-3368@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from jakub at gcc dot gnu dot org 2006-01-17 10:00 -------
Subject: Bug 25682
Author: jakub
Date: Tue Jan 17 10:00:05 2006
New Revision: 109813
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109813
Log:
PR c/25682
* c-typeck.c (build_unary_op): Fold offsetof-like expressions
even when the pointer is not NULL.
cp/
* decl.c (compute_array_index_type): After issuing not an integral
constant-expression error, set size to 1 to avoid ICEs later on.
testsuite/
* gcc.dg/pr25682.c: New test.
* g++.dg/parse/array-size2.C: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/g++.dg/parse/array-size2.C
branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/pr25682.c
Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/c-typeck.c
branches/gcc-4_1-branch/gcc/cp/ChangeLog
branches/gcc-4_1-branch/gcc/cp/decl.c
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25682