public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35074] New: [4.3 regression] ICE with attribute "aligned" for template classes
@ 2008-02-04 13:16 reichelt at gcc dot gnu dot org
2008-02-04 13:17 ` [Bug c++/35074] " reichelt at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-02-04 13:16 UTC (permalink / raw)
To: gcc-bugs
The following valid code snippet triggers an ICE on mainline:
==========================================
template<typename T> struct A
{
void foo() const;
} __attribute((aligned(4)));
template<typename T> void A<T>::foo() const {}
==========================================
bug.cc:6: internal compiler error: canonical types differ for identical types
const A<T> and const A<T>
Please submit a full bug report, [etc.]
The ICE is pretty recent, it appeared between 2008-01-22 and 2008-01-28.
--
Summary: [4.3 regression] ICE with attribute "aligned" for
template classes
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, monitored
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35074
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/35074] [4.3 regression] ICE with attribute "aligned" for template classes
2008-02-04 13:16 [Bug c++/35074] New: [4.3 regression] ICE with attribute "aligned" for template classes reichelt at gcc dot gnu dot org
@ 2008-02-04 13:17 ` reichelt at gcc dot gnu dot org
2008-02-04 13:19 ` reichelt at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-02-04 13:17 UTC (permalink / raw)
To: gcc-bugs
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35074
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/35074] [4.3 regression] ICE with attribute "aligned" for template classes
2008-02-04 13:16 [Bug c++/35074] New: [4.3 regression] ICE with attribute "aligned" for template classes reichelt at gcc dot gnu dot org
2008-02-04 13:17 ` [Bug c++/35074] " reichelt at gcc dot gnu dot org
@ 2008-02-04 13:19 ` reichelt at gcc dot gnu dot org
2008-02-04 13:43 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-02-04 13:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from reichelt at gcc dot gnu dot org 2008-02-04 13:18 -------
Jason, this might be fallout from your patch
2008-01-24 Jason Merrill <jason@redhat.com>
PR c++/34913
* decl2.c (is_late_template_attribute): Defer any attribute with
dependent args. Also defer type attributes if the type is dependent.
Would you mind having a look?
--
reichelt at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at redhat dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35074
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/35074] [4.3 regression] ICE with attribute "aligned" for template classes
2008-02-04 13:16 [Bug c++/35074] New: [4.3 regression] ICE with attribute "aligned" for template classes reichelt at gcc dot gnu dot org
2008-02-04 13:17 ` [Bug c++/35074] " reichelt at gcc dot gnu dot org
2008-02-04 13:19 ` reichelt at gcc dot gnu dot org
@ 2008-02-04 13:43 ` rguenth at gcc dot gnu dot org
2008-02-04 13:59 ` reichelt at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-04 13:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2008-02-04 13:42 -------
Without checking the code is rejected with:
t.C:6: error: prototype for 'void A<T>::foo() const' does not match any in
class 'A<T>'
t.C:3: error: candidate is: void A<T>::foo() const
Doug, I believe this is your change with canonical types.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dgregor at cs dot indiana
| |dot edu
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-checking, rejects-valid
Last reconfirmed|0000-00-00 00:00:00 |2008-02-04 13:42:26
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35074
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/35074] [4.3 regression] ICE with attribute "aligned" for template classes
2008-02-04 13:16 [Bug c++/35074] New: [4.3 regression] ICE with attribute "aligned" for template classes reichelt at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-02-04 13:43 ` rguenth at gcc dot gnu dot org
@ 2008-02-04 13:59 ` reichelt at gcc dot gnu dot org
2008-02-04 23:32 ` dgregor at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2008-02-04 13:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from reichelt at gcc dot gnu dot org 2008-02-04 13:59 -------
Well, the ICE appeared before
2008-01-31 Douglas Gregor <doug.gregor@gmail.com>
Jakub Jelinek <jakub@redhat.com>
PR c++/34935
PR c++/34936
* typeck.c (structural_comptypes): Handle comparisons of
VOID_TYPE, BOOLEAN_TYPE, INTEGER_TYPE, FIXED_POINT_TYPE, and
REAL_TYPE nodes.
* mangle.c (write_builtin_type): Map down to the canonical type,
which will be one of the predefined type nodes.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35074
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/35074] [4.3 regression] ICE with attribute "aligned" for template classes
2008-02-04 13:16 [Bug c++/35074] New: [4.3 regression] ICE with attribute "aligned" for template classes reichelt at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-02-04 13:59 ` reichelt at gcc dot gnu dot org
@ 2008-02-04 23:32 ` dgregor at gcc dot gnu dot org
2008-02-05 13:31 ` dgregor at gcc dot gnu dot org
2008-02-05 13:31 ` dgregor at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2008-02-04 23:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from dgregor at gcc dot gnu dot org 2008-02-04 23:31 -------
Looking into this a little bit, the new save_template_attributes is modifying
the type node directly (adding new attributes), but that type node can then get
out of sync with other type nodes if it was the TYPE_MAIN_VARIANT (as it is for
this case). So, we need to do the same thing that decl_attributes does to
update all of the other variants with the new attributes. Patch in progress.
--
dgregor at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dgregor at gcc dot gnu dot
| |org
AssignedTo|unassigned at gcc dot gnu |dgregor at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2008-02-04 13:42:26 |2008-02-04 23:31:41
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35074
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/35074] [4.3 regression] ICE with attribute "aligned" for template classes
2008-02-04 13:16 [Bug c++/35074] New: [4.3 regression] ICE with attribute "aligned" for template classes reichelt at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-02-05 13:31 ` dgregor at gcc dot gnu dot org
@ 2008-02-05 13:31 ` dgregor at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2008-02-05 13:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from dgregor at gcc dot gnu dot org 2008-02-05 13:30 -------
Fixed on mainline
--
dgregor at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35074
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/35074] [4.3 regression] ICE with attribute "aligned" for template classes
2008-02-04 13:16 [Bug c++/35074] New: [4.3 regression] ICE with attribute "aligned" for template classes reichelt at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-02-04 23:32 ` dgregor at gcc dot gnu dot org
@ 2008-02-05 13:31 ` dgregor at gcc dot gnu dot org
2008-02-05 13:31 ` dgregor at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2008-02-05 13:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from dgregor at gcc dot gnu dot org 2008-02-05 13:30 -------
Subject: Bug 35074
Author: dgregor
Date: Tue Feb 5 13:29:43 2008
New Revision: 132120
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132120
Log:
2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
PR c++/35074
* decl2.c (save_template_attributes): When we're modifying the
TYPE_MAIN_VARIANT to add new attributes, be sure to also modify
all of the other variants to add those same attributes. Otherwise,
the main variant will be inconsistent with those other variants.
2008-02-05 Douglas Gregor <doug.gregor@gmail.com>
PR c++/35074
* g++.dg/ext/attrib30.C: New.
Added:
trunk/gcc/testsuite/g++.dg/ext/attrib30.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl2.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35074
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-02-05 13:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-04 13:16 [Bug c++/35074] New: [4.3 regression] ICE with attribute "aligned" for template classes reichelt at gcc dot gnu dot org
2008-02-04 13:17 ` [Bug c++/35074] " reichelt at gcc dot gnu dot org
2008-02-04 13:19 ` reichelt at gcc dot gnu dot org
2008-02-04 13:43 ` rguenth at gcc dot gnu dot org
2008-02-04 13:59 ` reichelt at gcc dot gnu dot org
2008-02-04 23:32 ` dgregor at gcc dot gnu dot org
2008-02-05 13:31 ` dgregor at gcc dot gnu dot org
2008-02-05 13:31 ` dgregor 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).