public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/18378] New: ICE when returning a copy of a packed member
@ 2004-11-08 17:23 jdboyer at mediatrix dot com
2004-11-08 18:04 ` [Bug c++/18378] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: jdboyer at mediatrix dot com @ 2004-11-08 17:23 UTC (permalink / raw)
To: gcc-bugs
Defining a class method which returns a copy of one of its members, and this
member is declared "packed", and this member is from another class type, causes
an internal compiler error when this method is called.
The bug was verified on both gcc 3.4.2 and 3.4.3, on i686-linux and powerpc-
linux.
The following simple program will crash g++ when compiled with -DSHOW_ICE.
---------------------------------------------------------------------------
class A
{
public:
int i;
A() {}
A(const A& a) { i = a.i; }
};
class B
{
#ifdef SHOW_ICE
A a __attribute__((packed));
#else
A a;
#endif
public:
B() {}
A GetA() { return a; }
};
int main()
{
B b;
return b.GetA().i;
}
---------------------------------------------------------------------------
Jean-Denis Boyer,
Mediatrix Telecom Inc.
--
Summary: ICE when returning a copy of a packed member
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jdboyer at mediatrix dot com
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18378
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/18378] [3.4/4.0 Regression] ICE when returning a copy of a packed member
2004-11-08 17:23 [Bug c++/18378] New: ICE when returning a copy of a packed member jdboyer at mediatrix dot com
@ 2004-11-08 18:04 ` pinskia at gcc dot gnu dot org
2004-11-08 18:15 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-08 18:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-08 18:04 -------
: Search converges between 2003-10-14-trunk (#376) and 2003-10-15-trunk (#377).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-11-08 18:04:35
date| |
Summary|ICE when returning a copy of|[3.4/4.0 Regression] ICE
|a packed member |when returning a copy of a
| |packed member
Target Milestone|--- |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18378
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/18378] [3.4/4.0 Regression] ICE when returning a copy of a packed member
2004-11-08 17:23 [Bug c++/18378] New: ICE when returning a copy of a packed member jdboyer at mediatrix dot com
2004-11-08 18:04 ` [Bug c++/18378] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2004-11-08 18:15 ` pinskia at gcc dot gnu dot org
2004-11-25 22:25 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-08 18:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-08 18:14 -------
Related to PR 13744.
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |13744
Known to fail| |3.4.0
Known to work| |3.3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18378
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/18378] [3.4/4.0 Regression] ICE when returning a copy of a packed member
2004-11-08 17:23 [Bug c++/18378] New: ICE when returning a copy of a packed member jdboyer at mediatrix dot com
2004-11-08 18:04 ` [Bug c++/18378] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
2004-11-08 18:15 ` pinskia at gcc dot gnu dot org
@ 2004-11-25 22:25 ` pinskia at gcc dot gnu dot org
2004-11-25 23:33 ` giovannibajo at libero dot it
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-25 22:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-25 22:25 -------
*** Bug 18676 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pluto at pld-linux dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18378
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/18378] [3.4/4.0 Regression] ICE when returning a copy of a packed member
2004-11-08 17:23 [Bug c++/18378] New: ICE when returning a copy of a packed member jdboyer at mediatrix dot com
` (2 preceding siblings ...)
2004-11-25 22:25 ` pinskia at gcc dot gnu dot org
@ 2004-11-25 23:33 ` giovannibajo at libero dot it
2004-12-21 21:20 ` mmitchel at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: giovannibajo at libero dot it @ 2004-11-25 23:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-11-25 23:33 -------
Roger, attribute packed and copies again :)
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |sayle at gcc dot gnu dot
| |org, giovannibajo at libero
| |dot it
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18378
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/18378] [3.4/4.0 Regression] ICE when returning a copy of a packed member
2004-11-08 17:23 [Bug c++/18378] New: ICE when returning a copy of a packed member jdboyer at mediatrix dot com
` (3 preceding siblings ...)
2004-11-25 23:33 ` giovannibajo at libero dot it
@ 2004-12-21 21:20 ` mmitchel at gcc dot gnu dot org
2004-12-22 3:35 ` cvs-commit at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-12-21 21:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-12-21 21:20 -------
This code is invalid, and should result in an error message.
Working on a fix.
--
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=18378
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/18378] [3.4/4.0 Regression] ICE when returning a copy of a packed member
2004-11-08 17:23 [Bug c++/18378] New: ICE when returning a copy of a packed member jdboyer at mediatrix dot com
` (4 preceding siblings ...)
2004-12-21 21:20 ` mmitchel at gcc dot gnu dot org
@ 2004-12-22 3:35 ` cvs-commit at gcc dot gnu dot org
2004-12-22 3:39 ` [Bug c++/18378] [3.4 " mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-12-22 3:35 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-12-22 03:35 -------
Subject: Bug 18378
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2004-12-22 03:34:59
Modified files:
gcc/cp : ChangeLog call.c decl.c parser.c tree.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/ext: packed8.C
gcc/testsuite/g++.dg/template: crash31.C crash30.C
Log message:
PR c++/18378
* call.c (convert_like_real): Do not permit the use of a copy
constructor to copy a packed field.
PR c++/17413
* decl.c (grokdeclarator): Return error_mark_node, not
void_type_node, to indicate errors.
* parser.c (cp_parser_template_parameter_list): Robustify.
(cp_parser_template_parameter): Likewise.
PR c++/19034
* tree.c (cp_tree_equal): Handle OVERLOAD.
PR c++/18378
* g++.dg/ext/packed8.C: New test.
PR c++/13268
* g++.dg/template/crash31.C: New test.
PR c++/19034
* g++.dg/template/crash30.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4550&r2=1.4551
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.523&r2=1.524
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1345&r2=1.1346
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.296&r2=1.297
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/tree.c.diff?cvsroot=gcc&r1=1.420&r2=1.421
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/packed8.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/crash31.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/crash30.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4796&r2=1.4797
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18378
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/18378] [3.4 Regression] ICE when returning a copy of a packed member
2004-11-08 17:23 [Bug c++/18378] New: ICE when returning a copy of a packed member jdboyer at mediatrix dot com
` (5 preceding siblings ...)
2004-12-22 3:35 ` cvs-commit at gcc dot gnu dot org
@ 2004-12-22 3:39 ` mmitchel at gcc dot gnu dot org
2005-04-13 12:07 ` reichelt at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-12-22 3:39 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2004-12-22 03:38 -------
Fixed in GCC 4.0.
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|[3.4/4.0 Regression] ICE |[3.4 Regression] ICE when
|when returning a copy of a |returning a copy of a packed
|packed member |member
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18378
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/18378] [3.4 Regression] ICE when returning a copy of a packed member
2004-11-08 17:23 [Bug c++/18378] New: ICE when returning a copy of a packed member jdboyer at mediatrix dot com
` (6 preceding siblings ...)
2004-12-22 3:39 ` [Bug c++/18378] [3.4 " mmitchel at gcc dot gnu dot org
@ 2005-04-13 12:07 ` reichelt at gcc dot gnu dot org
2005-05-19 17:44 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-04-13 12:07 UTC (permalink / raw)
To: gcc-bugs
--
Bug 18378 depends on bug 13744, which changed state.
Bug 13744 Summary: ICE when using implicit copy constructor for struct defined in template function
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13744
What |Old Value |New Value
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18378
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/18378] [3.4 Regression] ICE when returning a copy of a packed member
2004-11-08 17:23 [Bug c++/18378] New: ICE when returning a copy of a packed member jdboyer at mediatrix dot com
` (7 preceding siblings ...)
2005-04-13 12:07 ` reichelt at gcc dot gnu dot org
@ 2005-05-19 17:44 ` mmitchel at gcc dot gnu dot org
2005-07-28 10:25 ` cvs-commit at gcc dot gnu dot org
2005-07-28 10:26 ` giovannibajo at libero dot it
10 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-05-19 17:44 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=18378
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/18378] [3.4 Regression] ICE when returning a copy of a packed member
2004-11-08 17:23 [Bug c++/18378] New: ICE when returning a copy of a packed member jdboyer at mediatrix dot com
` (8 preceding siblings ...)
2005-05-19 17:44 ` mmitchel at gcc dot gnu dot org
@ 2005-07-28 10:25 ` cvs-commit at gcc dot gnu dot org
2005-07-28 10:26 ` giovannibajo at libero dot it
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-07-28 10:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-07-28 10:23 -------
Subject: Bug 18378
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: giovannibajo@gcc.gnu.org 2005-07-28 10:22:23
Modified files:
gcc/testsuite : ChangeLog
gcc/cp : ChangeLog call.c parser.c pt.c
gcc/testsuite/g++.dg/parse: crash11.C crash13.C
Added files:
gcc/testsuite/g++.dg/ext: packed8.C
gcc/testsuite/g++.dg/parse: error18.C
gcc/testsuite/g++.dg/template: crash25.C local5.C typedef2.C
Log message:
Backport:
2004-09-16 Mark Mitchell <mark@codesourcery.com>
PR c++/16002
* parser.c (cp_parser_simple_declaration): Commit to tentative
parses after seeing a decl-specifier.
(cp_parser_simple_declaration): Eliminate spurious message.
(cp_parser_init_declarator): Adjust error message.
2005-06-17 Geoffrey Keating <geoffk@apple.com>
PR c++/17413
* pt.c (type_unification_real): Apply template type deduction even
to procedure parameters that are not dependent on a template
parameter.
2004-11-02 Mark Mitchell <mark@codesourcery.com>
PR c++/18124
* parser.c (cp_parser_type_parameter): Robustify.
PR c++/18155
* parser.c (cp_parser_single_declaration): Disallow template
typedefs.
(cp_parser_typedef_p): New function.
2004-12-21 Mark Mitchell <mark@codesourcery.com>
PR c++/18378
* call.c (convert_like_real): Do not permit the use of a copy
constructor to copy a packed field.
Backport:
2004-09-16 Mark Mitchell <mark@codesourcery.com>
PR c++/16002
* g++.dg/parse/error18.C: New test.
* g++.dg/parse/crash11.C: Adjust error markers.
2005-06-17 Geoffrey Keating <geoffk@apple.com>
PR c++/17413
* g++.dg/template/local5.C: New.
2004-11-02 Mark Mitchell <mark@codesourcery.com>
PR c++/18124
* g++.dg/template/crash25.C: New test.
PR c++/18155
* g++.dg/template/typedef2.C: New test.
* g++.dg/parse/crash13.C: Adjust error markers.
2004-12-21 Mark Mitchell <mark@codesourcery.com>
PR c++/18378
* g++.dg/ext/packed8.C: New test.
Patches:
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.411&r2=1.3389.2.412
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.228&r2=1.3892.2.229
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.26&r2=1.452.2.27
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.157.2.57&r2=1.157.2.58
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.816.2.56&r2=1.816.2.57
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/packed8.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.42.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/error18.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1.12.3&r2=1.1.12.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash11.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.2&r2=1.2.24.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/crash13.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1&r2=1.1.14.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/crash25.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.38.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/local5.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.14.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/typedef2.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.38.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18378
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/18378] [3.4 Regression] ICE when returning a copy of a packed member
2004-11-08 17:23 [Bug c++/18378] New: ICE when returning a copy of a packed member jdboyer at mediatrix dot com
` (9 preceding siblings ...)
2005-07-28 10:25 ` cvs-commit at gcc dot gnu dot org
@ 2005-07-28 10:26 ` giovannibajo at libero dot it
10 siblings, 0 replies; 12+ messages in thread
From: giovannibajo at libero dot it @ 2005-07-28 10:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2005-07-28 10:26 -------
Fixed also for GCC 3.4.5.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18378
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2005-07-28 10:26 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-08 17:23 [Bug c++/18378] New: ICE when returning a copy of a packed member jdboyer at mediatrix dot com
2004-11-08 18:04 ` [Bug c++/18378] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
2004-11-08 18:15 ` pinskia at gcc dot gnu dot org
2004-11-25 22:25 ` pinskia at gcc dot gnu dot org
2004-11-25 23:33 ` giovannibajo at libero dot it
2004-12-21 21:20 ` mmitchel at gcc dot gnu dot org
2004-12-22 3:35 ` cvs-commit at gcc dot gnu dot org
2004-12-22 3:39 ` [Bug c++/18378] [3.4 " mmitchel at gcc dot gnu dot org
2005-04-13 12:07 ` reichelt at gcc dot gnu dot org
2005-05-19 17:44 ` mmitchel at gcc dot gnu dot org
2005-07-28 10:25 ` cvs-commit at gcc dot gnu dot org
2005-07-28 10:26 ` giovannibajo at libero dot it
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).