public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/20153] New: ICE when C++ template function contains anonymous union
@ 2005-02-23 5:32 us15 at os dot inf dot tu-dresden dot de
2005-02-23 5:35 ` [Bug c++/20153] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: us15 at os dot inf dot tu-dresden dot de @ 2005-02-23 5:32 UTC (permalink / raw)
To: gcc-bugs
The following program causes an internal compiler error when compiled with
gcc-3.4.3 or gcc-4.0 (CVS):
template <typename T>
class C
{
public:
void foo();
};
template <typename T>
void
C<T>::foo()
{
union {
struct {
};
};
};
int main()
{
return 0;
}
--
Summary: ICE when C++ template function contains anonymous union
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: us15 at os dot inf dot tu-dresden dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i486-slackware-linux
GCC host triplet: i486-slackware-linux
GCC target triplet: i486-slackware-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20153
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/20153] [3.4/4.0 Regression] ICE when C++ template function contains anonymous union
2005-02-23 5:32 [Bug c++/20153] New: ICE when C++ template function contains anonymous union us15 at os dot inf dot tu-dresden dot de
@ 2005-02-23 5:35 ` pinskia at gcc dot gnu dot org
2005-02-23 9:26 ` mmitchel at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-23 5:35 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1143 bytes --]
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-22 20:22 -------
Reduced to:
template <typename T>
void
foo()
{
union { struct { }; };
}
This is invalid code, if we do without template function we get an error:
t.cc: In function void foo():
t.cc:8: error: anonymous struct not inside named type
t.cc:8: warning: anonymous union with no members
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-invalid-code
Last reconfirmed|0000-00-00 00:00:00 |2005-02-22 20:22:12
date| |
Summary|ICE when C++ template |[3.4/4.0 Regression] ICE
|function contains anonymous |when C++ template function
|union |contains anonymous union
Target Milestone|--- |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20153
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/20153] [3.4/4.0 Regression] ICE when C++ template function contains anonymous union
2005-02-23 5:32 [Bug c++/20153] New: ICE when C++ template function contains anonymous union us15 at os dot inf dot tu-dresden dot de
2005-02-23 5:35 ` [Bug c++/20153] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2005-02-23 9:26 ` mmitchel at gcc dot gnu dot org
2005-02-23 10:53 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-02-23 9:26 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20153
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/20153] [3.4/4.0 Regression] ICE when C++ template function contains anonymous union
2005-02-23 5:32 [Bug c++/20153] New: ICE when C++ template function contains anonymous union us15 at os dot inf dot tu-dresden dot de
2005-02-23 5:35 ` [Bug c++/20153] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
2005-02-23 9:26 ` mmitchel at gcc dot gnu dot org
@ 2005-02-23 10:53 ` pinskia at gcc dot gnu dot org
2005-02-23 12:58 ` cvs-commit at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-23 10:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-23 00:00 -------
: Search converges between 2003-01-15-trunk (#165) and 2003-01-17-trunk (#166).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20153
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/20153] [3.4/4.0 Regression] ICE when C++ template function contains anonymous union
2005-02-23 5:32 [Bug c++/20153] New: ICE when C++ template function contains anonymous union us15 at os dot inf dot tu-dresden dot de
` (2 preceding siblings ...)
2005-02-23 10:53 ` pinskia at gcc dot gnu dot org
@ 2005-02-23 12:58 ` cvs-commit at gcc dot gnu dot org
2005-02-23 13:47 ` [Bug c++/20153] [3.4 " mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-23 12:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-02-23 05:31 -------
Subject: Bug 20153
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2005-02-23 05:30:51
Modified files:
gcc/testsuite/g++.dg/template: qualttp15.C
gcc/testsuite/g++.old-deja/g++.other: struct1.C
gcc/testsuite : ChangeLog
gcc/cp : ChangeLog decl2.c error.c init.c parser.c
semantics.c
Added files:
gcc/testsuite/g++.dg/parse: constant7.C error27.C error26.C
gcc/testsuite/g++.dg/template: error17.C
Log message:
PR c++/19991
* init.c (integral_constant_value): Iterate if the value of a decl
is itself a constant.
PR c++/20152
* parser.c (cp_parser_class_head): Check for redefintions here.
* semantics.c (begin_class_definition): Not here.
PR c++/20153
* decl2.c (build_anon_union_vars): Add type parameter.
(finish_anon_union): Pass it.
PR c++/20148
* error.c (dump_expr): Do not print the body of a BIND_EXPR.
Handle STATEMENT_LIST.
PR c++/19991
* g++.dg/parse/constant7.C: New test.
PR c++/20152
* g++.dg/parse/error27.C: New test.
* g++.dg/template/qualttp15.C: Adjust error markers.
* g++.old-deja/g++.other/struct1.C: Likewise.
PR c++/20153
* g++.dg/template/error17.C: New test.
PR c++/20148
* g++.dg/parser/error26.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/constant7.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/error27.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/error26.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/error17.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/qualttp15.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.old-deja/g++.other/struct1.C.diff?cvsroot=gcc&r1=1.3&r2=1.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5072&r2=1.5073
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4641&r2=1.4642
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl2.c.diff?cvsroot=gcc&r1=1.768&r2=1.769
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/error.c.diff?cvsroot=gcc&r1=1.276&r2=1.277
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/init.c.diff?cvsroot=gcc&r1=1.410&r2=1.411
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.317&r2=1.318
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.462&r2=1.463
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20153
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/20153] [3.4 Regression] ICE when C++ template function contains anonymous union
2005-02-23 5:32 [Bug c++/20153] New: ICE when C++ template function contains anonymous union us15 at os dot inf dot tu-dresden dot de
` (3 preceding siblings ...)
2005-02-23 12:58 ` cvs-commit at gcc dot gnu dot org
@ 2005-02-23 13:47 ` mmitchel at gcc dot gnu dot org
2005-05-19 17:36 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-02-23 13:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-02-23 05:36 -------
Fixed in 4.0.
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail|3.4.0 4.0.0 |3.4.0
Known to work|3.3.3 |3.3.3 4.0.0
Summary|[3.4/4.0 Regression] ICE |[3.4 Regression] ICE when
|when C++ template function |C++ template function
|contains anonymous union |contains anonymous union
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20153
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/20153] [3.4 Regression] ICE when C++ template function contains anonymous union
2005-02-23 5:32 [Bug c++/20153] New: ICE when C++ template function contains anonymous union us15 at os dot inf dot tu-dresden dot de
` (4 preceding siblings ...)
2005-02-23 13:47 ` [Bug c++/20153] [3.4 " mmitchel at gcc dot gnu dot org
@ 2005-05-19 17:36 ` mmitchel at gcc dot gnu dot org
2005-09-01 9:13 ` reichelt at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-05-19 17:36 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.4 |3.4.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20153
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/20153] [3.4 Regression] ICE when C++ template function contains anonymous union
2005-02-23 5:32 [Bug c++/20153] New: ICE when C++ template function contains anonymous union us15 at os dot inf dot tu-dresden dot de
` (5 preceding siblings ...)
2005-05-19 17:36 ` mmitchel at gcc dot gnu dot org
@ 2005-09-01 9:13 ` reichelt at gcc dot gnu dot org
2005-09-01 11:48 ` cvs-commit at gcc dot gnu dot org
2005-09-01 11:49 ` reichelt at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-09-01 9:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-09-01 09:13 -------
Taking care of the backport to the 3.4 branch.
--
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2005-
| |09/msg00016.html
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20153
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/20153] [3.4 Regression] ICE when C++ template function contains anonymous union
2005-02-23 5:32 [Bug c++/20153] New: ICE when C++ template function contains anonymous union us15 at os dot inf dot tu-dresden dot de
` (6 preceding siblings ...)
2005-09-01 9:13 ` reichelt at gcc dot gnu dot org
@ 2005-09-01 11:48 ` cvs-commit at gcc dot gnu dot org
2005-09-01 11:49 ` reichelt at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-01 11:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-09-01 11:47 -------
Subject: Bug 20153
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: reichelt@gcc.gnu.org 2005-09-01 11:47:42
Modified files:
gcc/cp : ChangeLog decl2.c call.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/template: error17.C
gcc/testsuite/g++.dg/expr: ptrmem7.C
Log message:
Backport:
2005-02-22 Mark Mitchell <mark@codesourcery.com>
PR c++/20153
* decl2.c (build_anon_union_vars): Add type parameter.
(finish_anon_union): Pass it.
* g++.dg/template/error17.C: New test.
2005-07-28 Mark Mitchell <mark@codesourcery.com>
PR c++/22545
* call.c (add_builtin_candidate): Adjust for changes in
representation of pointer-to-member types.
* g++.dg/expr/ptrmem7.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.232&r2=1.3892.2.233
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl2.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.695.4.10&r2=1.695.4.11
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.452.2.27&r2=1.452.2.28
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.423&r2=1.3389.2.424
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/error17.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.40.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/expr/ptrmem7.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.12.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20153
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c++/20153] [3.4 Regression] ICE when C++ template function contains anonymous union
2005-02-23 5:32 [Bug c++/20153] New: ICE when C++ template function contains anonymous union us15 at os dot inf dot tu-dresden dot de
` (7 preceding siblings ...)
2005-09-01 11:48 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-01 11:49 ` reichelt at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-09-01 11:49 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-09-01 11:49 -------
Fixed also on the 3.4 branch.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20153
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-09-01 11:49 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-23 5:32 [Bug c++/20153] New: ICE when C++ template function contains anonymous union us15 at os dot inf dot tu-dresden dot de
2005-02-23 5:35 ` [Bug c++/20153] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
2005-02-23 9:26 ` mmitchel at gcc dot gnu dot org
2005-02-23 10:53 ` pinskia at gcc dot gnu dot org
2005-02-23 12:58 ` cvs-commit at gcc dot gnu dot org
2005-02-23 13:47 ` [Bug c++/20153] [3.4 " mmitchel at gcc dot gnu dot org
2005-05-19 17:36 ` mmitchel at gcc dot gnu dot org
2005-09-01 9:13 ` reichelt at gcc dot gnu dot org
2005-09-01 11:48 ` cvs-commit at gcc dot gnu dot org
2005-09-01 11:49 ` reichelt 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).