public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35321] New: [4.1/4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof
@ 2008-02-23 18:31 reichelt at gcc dot gnu dot org
2008-02-23 18:32 ` [Bug c++/35321] " reichelt at gcc dot gnu dot org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-02-23 18:31 UTC (permalink / raw)
To: gcc-bugs
The following invalid code snippet triggers an ICE since GCC 4.0.0:
=========================================
struct A
{
A operator[] (int);
};
struct B
{
A a;
};
void foo()
{
__builtin_offsetof(B, a[0]);
}
=========================================
bug.cc: In function 'void foo()':
bug.cc:13: internal compiler error: in fold_offsetof_1, at c-common.c:6850
Please submit a full bug report, [etc.]
Before, the code was rejected as __builtin_offsetof was not yet supported.
The problem is related to PR28573.
--
Summary: [4.1/4.2/4.3/4.4 regression] ICE with invalid use of
__builtin_offsetof
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, monitored
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
BugsThisDependsOn: 28573
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35321
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35321] [4.1/4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof
2008-02-23 18:31 [Bug c++/35321] New: [4.1/4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof reichelt at gcc dot gnu dot org
@ 2008-02-23 18:32 ` reichelt at gcc dot gnu dot org
2008-03-03 16:27 ` rguenth at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-02-23 18:32 UTC (permalink / raw)
To: gcc-bugs
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35321
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35321] [4.1/4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof
2008-02-23 18:31 [Bug c++/35321] New: [4.1/4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof reichelt at gcc dot gnu dot org
2008-02-23 18:32 ` [Bug c++/35321] " reichelt at gcc dot gnu dot org
@ 2008-03-03 16:27 ` rguenth at gcc dot gnu dot org
2008-07-04 22:35 ` [Bug c++/35321] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-03-03 16:27 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Priority|P3 |P2
Last reconfirmed|0000-00-00 00:00:00 |2008-03-03 16:26:46
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35321
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35321] [4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof
2008-02-23 18:31 [Bug c++/35321] New: [4.1/4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof reichelt at gcc dot gnu dot org
2008-02-23 18:32 ` [Bug c++/35321] " reichelt at gcc dot gnu dot org
2008-03-03 16:27 ` rguenth at gcc dot gnu dot org
@ 2008-07-04 22:35 ` jsm28 at gcc dot gnu dot org
2008-08-17 15:42 ` paolo dot carlini at oracle dot com
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-07-04 22:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jsm28 at gcc dot gnu dot org 2008-07-04 22:34 -------
Closing 4.1 branch.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.1/4.2/4.3/4.4 regression]|[4.2/4.3/4.4 regression] ICE
|ICE with invalid use of |with invalid use of
|__builtin_offsetof |__builtin_offsetof
Target Milestone|4.1.3 |4.2.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35321
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35321] [4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof
2008-02-23 18:31 [Bug c++/35321] New: [4.1/4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-07-04 22:35 ` [Bug c++/35321] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
@ 2008-08-17 15:42 ` paolo dot carlini at oracle dot com
2008-08-17 16:06 ` bonzini at gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-08-17 15:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from paolo dot carlini at oracle dot com 2008-08-17 15:40 -------
Paolo, can you have a quick look to this one? Seems indeed in the same ball
park of PR28573, which you fixed. Is it just matter of handling TARGET_EXPR the
same way of CALL_EXPR in fold_offsetof_1? (passes testing for me...)
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |paolo at gcc dot gnu dot
| |org, bonzini at gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35321
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35321] [4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof
2008-02-23 18:31 [Bug c++/35321] New: [4.1/4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-08-17 15:42 ` paolo dot carlini at oracle dot com
@ 2008-08-17 16:06 ` bonzini at gnu dot org
2008-08-17 16:18 ` paolo dot carlini at oracle dot com
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bonzini at gnu dot org @ 2008-08-17 16:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from bonzini at gnu dot org 2008-08-17 16:05 -------
Indeed, it's just that this operator[] throws.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35321
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35321] [4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof
2008-02-23 18:31 [Bug c++/35321] New: [4.1/4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-08-17 16:06 ` bonzini at gnu dot org
@ 2008-08-17 16:18 ` paolo dot carlini at oracle dot com
2008-08-27 17:11 ` [Bug c++/35321] [4.2/4.3 " paolo at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-08-17 16:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from paolo dot carlini at oracle dot com 2008-08-17 16:17 -------
Ok, thanks, I'll submit a patchlet.
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |paolo dot carlini at oracle
|dot org |dot com
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35321
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35321] [4.2/4.3 regression] ICE with invalid use of __builtin_offsetof
2008-02-23 18:31 [Bug c++/35321] New: [4.1/4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof reichelt at gcc dot gnu dot org
` (6 preceding siblings ...)
2008-08-27 17:11 ` [Bug c++/35321] [4.2/4.3 " paolo at gcc dot gnu dot org
@ 2008-08-27 17:11 ` paolo dot carlini at oracle dot com
2009-01-02 22:39 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-08-27 17:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from paolo dot carlini at oracle dot com 2008-08-27 17:09 -------
Fixed for 4.4.0.
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|paolo dot carlini at oracle |unassigned at gcc dot gnu
|dot com |dot org
Status|ASSIGNED |NEW
Summary|[4.2/4.3/4.4 regression] ICE|[4.2/4.3 regression] ICE
|with invalid use of |with invalid use of
|__builtin_offsetof |__builtin_offsetof
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35321
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35321] [4.2/4.3 regression] ICE with invalid use of __builtin_offsetof
2008-02-23 18:31 [Bug c++/35321] New: [4.1/4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof reichelt at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-08-17 16:18 ` paolo dot carlini at oracle dot com
@ 2008-08-27 17:11 ` paolo at gcc dot gnu dot org
2008-08-27 17:11 ` paolo dot carlini at oracle dot com
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: paolo at gcc dot gnu dot org @ 2008-08-27 17:11 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from paolo at gcc dot gnu dot org 2008-08-27 17:10 -------
Subject: Bug 35321
Author: paolo
Date: Wed Aug 27 17:08:40 2008
New Revision: 139628
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139628
Log:
2008-08-27 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/35321
* c-common.c (fold_offsetof_1): Handle TARGET_EXPR like CALL_EXPR.
/testsuite
2008-08-27 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/35321
* g++.dg/parse/offsetof8.C: New.
Added:
trunk/gcc/testsuite/g++.dg/parse/offsetof8.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-common.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35321
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35321] [4.2/4.3 regression] ICE with invalid use of __builtin_offsetof
2008-02-23 18:31 [Bug c++/35321] New: [4.1/4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof reichelt at gcc dot gnu dot org
` (7 preceding siblings ...)
2008-08-27 17:11 ` paolo dot carlini at oracle dot com
@ 2009-01-02 22:39 ` pinskia at gcc dot gnu dot org
2009-03-31 20:21 ` [Bug c++/35321] [4.3 " jsm28 at gcc dot gnu dot org
2009-04-22 15:31 ` rguenth at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-02 22:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pinskia at gcc dot gnu dot org 2009-01-02 22:37 -------
I have a real fix for this bug, and we get an error message now.
t.cc:13: error: using [] in offset with a pointer.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35321
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35321] [4.3 regression] ICE with invalid use of __builtin_offsetof
2008-02-23 18:31 [Bug c++/35321] New: [4.1/4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof reichelt at gcc dot gnu dot org
` (8 preceding siblings ...)
2009-01-02 22:39 ` pinskia at gcc dot gnu dot org
@ 2009-03-31 20:21 ` jsm28 at gcc dot gnu dot org
2009-04-22 15:31 ` rguenth at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31 20:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jsm28 at gcc dot gnu dot org 2009-03-31 20:21 -------
Closing 4.2 branch.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.2/4.3 regression] ICE |[4.3 regression] ICE with
|with invalid use of |invalid use of
|__builtin_offsetof |__builtin_offsetof
Target Milestone|4.2.5 |4.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35321
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/35321] [4.3 regression] ICE with invalid use of __builtin_offsetof
2008-02-23 18:31 [Bug c++/35321] New: [4.1/4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof reichelt at gcc dot gnu dot org
` (9 preceding siblings ...)
2009-03-31 20:21 ` [Bug c++/35321] [4.3 " jsm28 at gcc dot gnu dot org
@ 2009-04-22 15:31 ` rguenth at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-04-22 15:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from rguenth at gcc dot gnu dot org 2009-04-22 15:31 -------
WONTFIX for 4.3.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Known to fail| |4.3.3
Known to work| |4.4.0
Resolution| |FIXED
Target Milestone|4.3.4 |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35321
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2009-04-22 15:31 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-23 18:31 [Bug c++/35321] New: [4.1/4.2/4.3/4.4 regression] ICE with invalid use of __builtin_offsetof reichelt at gcc dot gnu dot org
2008-02-23 18:32 ` [Bug c++/35321] " reichelt at gcc dot gnu dot org
2008-03-03 16:27 ` rguenth at gcc dot gnu dot org
2008-07-04 22:35 ` [Bug c++/35321] [4.2/4.3/4.4 " jsm28 at gcc dot gnu dot org
2008-08-17 15:42 ` paolo dot carlini at oracle dot com
2008-08-17 16:06 ` bonzini at gnu dot org
2008-08-17 16:18 ` paolo dot carlini at oracle dot com
2008-08-27 17:11 ` [Bug c++/35321] [4.2/4.3 " paolo at gcc dot gnu dot org
2008-08-27 17:11 ` paolo dot carlini at oracle dot com
2009-01-02 22:39 ` pinskia at gcc dot gnu dot org
2009-03-31 20:21 ` [Bug c++/35321] [4.3 " jsm28 at gcc dot gnu dot org
2009-04-22 15:31 ` rguenth 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).