public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50207] New: G++ segv's on reduced test case
@ 2011-08-27 4:49 bergner at gcc dot gnu.org
2011-08-27 6:12 ` [Bug c++/50207] " pinskia at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: bergner at gcc dot gnu.org @ 2011-08-27 4:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50207
Bug #: 50207
Summary: G++ segv's on reduced test case
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: bergner@gcc.gnu.org
A G++ from today's trunk (20110826) segv's on a reduced test case (using delta)
like so:
bergner@igoo:~> cat minimal.ii
typedef long unsigned int size_t;
namespace std __attribute__ ((__visibility__ ("default")))
{
using::size_t;
}
typedef unsigned char uint8_t;
namespace std
{
namespace decimal
{
template < class _Fmt > struct _FmtTraits;
class decimal32;
}
}
namespace std
{
namespace decimal
{
template <> class _FmtTraits < decimal32 >
{
public:
static const std::size_t _NumBytes = 4UL;
};
template < class _Tr > class _DecBase
{
uint8_t _Bytes[_Tr::_NumBytes];
};
class decimal32:public _DecBase < _FmtTraits < decimal32 > >
{
decimal32 () { }
};
}
}
bergner@igoo:~> /home/bergner/gcc/install/gcc-mainline-debug/bin/g++ -Wall -S
minimal.ii
g++: internal compiler error: Segmentation fault (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
GDB show this backtrace:
#0 0x0000000010412cc8 in decl_is_template_id (decl=0xfffb6edcc18,
template_info=0xfffb6edcc18)
at /home/bergner/gcc/gcc-mainline-base/gcc/cp/mangle.c:267
#1 0x000000001041b44c in write_nested_name (decl=0xfffb6e24ac0) at
/home/bergner/gcc/gcc-mainline-base/gcc/cp/mangle.c:928
#2 0x000000001041ab48 in write_name (decl=0xfffb6e24ac0, ignore_local_scope=0)
at /home/bergner/gcc/gcc-mainline-base/gcc/cp/mangle.c:855
#3 0x00000000104284e4 in write_class_enum_type (type=0xfffb6edd4a0) at
/home/bergner/gcc/gcc-mainline-base/gcc/cp/mangle.c:2398
#4 0x0000000010424840 in write_type (type=0xfffb6edd4a0) at
/home/bergner/gcc/gcc-mainline-base/gcc/cp/mangle.c:1884
#5 0x000000001042d1ec in write_template_arg (node=0xfffb6edcc18) at
/home/bergner/gcc/gcc-mainline-base/gcc/cp/mangle.c:2843
#6 0x0000000010428868 in write_template_args (args=0xfffb6f13a70) at
/home/bergner/gcc/gcc-mainline-base/gcc/cp/mangle.c:2427
#7 0x000000001041b50c in write_nested_name (decl=0xfffb6e245b8) at
/home/bergner/gcc/gcc-mainline-base/gcc/cp/mangle.c:932
#8 0x000000001041ab48 in write_name (decl=0xfffb6e245b8, ignore_local_scope=0)
at /home/bergner/gcc/gcc-mainline-base/gcc/cp/mangle.c:855
#9 0x00000000104284e4 in write_class_enum_type (type=0xfffb6edccc0) at
/home/bergner/gcc/gcc-mainline-base/gcc/cp/mangle.c:2398
#10 0x0000000010424840 in write_type (type=0xfffb6edccc0) at
/home/bergner/gcc/gcc-mainline-base/gcc/cp/mangle.c:1884
#11 0x000000001042d1ec in write_template_arg (node=0xfffb6edccc0) at
/home/bergner/gcc/gcc-mainline-base/gcc/cp/mangle.c:2843
#12 0x0000000010428868 in write_template_args (args=0xfffb6f14088) at
/home/bergner/gcc/gcc-mainline-base/gcc/cp/mangle.c:2427
#13 0x000000001041b50c in write_nested_name (decl=0xfffb6e24ac0) at
/home/bergner/gcc/gcc-mainline-base/gcc/cp/mangle.c:932
#14 0x000000001041ab48 in write_name (decl=0xfffb6e24ac0, ignore_local_scope=0)
at /home/bergner/gcc/gcc-mainline-base/gcc/cp/mangle.c:855
#15 0x00000000104284e4 in write_class_enum_type (type=0xfffb6edd4a0) at
/home/bergner/gcc/gcc-mainline-base/gcc/cp/mangle.c:2398
#16 0x0000000010424840 in write_type (type=0xfffb6edd4a0) at
/home/bergner/gcc/gcc-mainline-base/gcc/cp/mangle.c:1884
#17 0x000000001042d1ec in write_template_arg (node=0xfffb6edcc18) at
/home/bergner/gcc/gcc-mainline-base/gcc/cp/mangle.c:2843
#18 0x0000000010428868 in write_template_args (args=0xfffb6f13a70) at
/home/bergner/gcc/gcc-mainline-base/gcc/cp/mangle.c:2427
...
The backtrace also show we have 10's of thousands of frames stacked repeated
over and over, so it looks like we've gone into some type of infinite
recursion. A quick look at GCC 4.6 show's it fails in the same manner. I
haven't checked anything earlier.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/50207] G++ segv's on reduced test case
2011-08-27 4:49 [Bug c++/50207] New: G++ segv's on reduced test case bergner at gcc dot gnu.org
@ 2011-08-27 6:12 ` pinskia at gcc dot gnu.org
2011-08-27 8:02 ` [Bug c++/50207] [4.7 Regression] " rguenth at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-08-27 6:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50207
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-08-27 04:48:41 UTC ---
Related to Bug 46862.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/50207] [4.7 Regression] G++ segv's on reduced test case
2011-08-27 4:49 [Bug c++/50207] New: G++ segv's on reduced test case bergner at gcc dot gnu.org
2011-08-27 6:12 ` [Bug c++/50207] " pinskia at gcc dot gnu.org
@ 2011-08-27 8:02 ` rguenth at gcc dot gnu.org
2011-08-29 10:07 ` jakub at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-27 8:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50207
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.7.0
Summary|G++ segv's on reduced test |[4.7 Regression] G++ segv's
|case |on reduced test case
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/50207] [4.7 Regression] G++ segv's on reduced test case
2011-08-27 4:49 [Bug c++/50207] New: G++ segv's on reduced test case bergner at gcc dot gnu.org
2011-08-27 6:12 ` [Bug c++/50207] " pinskia at gcc dot gnu.org
2011-08-27 8:02 ` [Bug c++/50207] [4.7 Regression] " rguenth at gcc dot gnu.org
@ 2011-08-29 10:07 ` jakub at gcc dot gnu.org
2011-08-29 10:12 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-08-29 10:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50207
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2011-08-29
CC| |jakub at gcc dot gnu.org
Ever Confirmed|0 |1
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-29 10:04:09 UTC ---
Caused by http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177647
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/50207] [4.7 Regression] G++ segv's on reduced test case
2011-08-27 4:49 [Bug c++/50207] New: G++ segv's on reduced test case bergner at gcc dot gnu.org
` (2 preceding siblings ...)
2011-08-29 10:07 ` jakub at gcc dot gnu.org
@ 2011-08-29 10:12 ` jakub at gcc dot gnu.org
2011-08-29 11:53 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-08-29 10:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50207
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-29 10:05:34 UTC ---
Oops, sorry, that was for PR50208.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/50207] [4.7 Regression] G++ segv's on reduced test case
2011-08-27 4:49 [Bug c++/50207] New: G++ segv's on reduced test case bergner at gcc dot gnu.org
` (3 preceding siblings ...)
2011-08-29 10:12 ` jakub at gcc dot gnu.org
@ 2011-08-29 11:53 ` jakub at gcc dot gnu.org
2011-08-29 13:14 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-08-29 11:53 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50207
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-29 11:18:10 UTC ---
I'd say this is invalid, TYPE_TRANSPARENT_AGGR is an ugly hack and we should
perhaps limit it just to scalar fields.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/50207] [4.7 Regression] G++ segv's on reduced test case
2011-08-27 4:49 [Bug c++/50207] New: G++ segv's on reduced test case bergner at gcc dot gnu.org
` (4 preceding siblings ...)
2011-08-29 11:53 ` jakub at gcc dot gnu.org
@ 2011-08-29 13:14 ` jakub at gcc dot gnu.org
2011-08-29 15:33 ` jason at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-08-29 13:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50207
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-29 12:48:10 UTC ---
Created attachment 25125
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25125
gcc47-pr50207.patch
Untested patch which adds that limitation. <decimal/decimal> still seems to
work.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/50207] [4.7 Regression] G++ segv's on reduced test case
2011-08-27 4:49 [Bug c++/50207] New: G++ segv's on reduced test case bergner at gcc dot gnu.org
` (5 preceding siblings ...)
2011-08-29 13:14 ` jakub at gcc dot gnu.org
@ 2011-08-29 15:33 ` jason at gcc dot gnu.org
2011-08-30 4:33 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jason at gcc dot gnu.org @ 2011-08-29 15:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50207
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> 2011-08-29 14:59:43 UTC ---
The problem here is not that the first field is aggregate, but that the first
field is a fake field for the base class. I'll adjust the patch accordingly.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/50207] [4.7 Regression] G++ segv's on reduced test case
2011-08-27 4:49 [Bug c++/50207] New: G++ segv's on reduced test case bergner at gcc dot gnu.org
` (6 preceding siblings ...)
2011-08-29 15:33 ` jason at gcc dot gnu.org
@ 2011-08-30 4:33 ` jason at gcc dot gnu.org
2011-08-30 4:40 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jason at gcc dot gnu.org @ 2011-08-30 4:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50207
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2011-08-30 04:30:56 UTC ---
Author: jason
Date: Tue Aug 30 04:30:42 2011
New Revision: 178276
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178276
Log:
PR c++/50207
* class.c (finish_struct_1): Complain if the first field is
artificial.
Added:
trunk/gcc/testsuite/g++.dg/dfp/base.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/class.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/50207] [4.7 Regression] G++ segv's on reduced test case
2011-08-27 4:49 [Bug c++/50207] New: G++ segv's on reduced test case bergner at gcc dot gnu.org
` (7 preceding siblings ...)
2011-08-30 4:33 ` jason at gcc dot gnu.org
@ 2011-08-30 4:40 ` jason at gcc dot gnu.org
2011-08-30 21:51 ` jason at gcc dot gnu.org
2011-09-08 18:33 ` bergner at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jason at gcc dot gnu.org @ 2011-08-30 4:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50207
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> 2011-08-30 04:37:23 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/50207] [4.7 Regression] G++ segv's on reduced test case
2011-08-27 4:49 [Bug c++/50207] New: G++ segv's on reduced test case bergner at gcc dot gnu.org
` (8 preceding siblings ...)
2011-08-30 4:40 ` jason at gcc dot gnu.org
@ 2011-08-30 21:51 ` jason at gcc dot gnu.org
2011-09-08 18:33 ` bergner at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jason at gcc dot gnu.org @ 2011-08-30 21:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50207
--- Comment #9 from Jason Merrill <jason at gcc dot gnu.org> 2011-08-30 21:48:38 UTC ---
Author: jason
Date: Tue Aug 30 21:48:34 2011
New Revision: 178343
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178343
Log:
PR c++/50207
* class.c (finish_struct_1): Complain if the first field is
artificial.
Added:
branches/gcc-4_6-branch/gcc/testsuite/g++.dg/dfp/base.C
Modified:
branches/gcc-4_6-branch/gcc/cp/ChangeLog
branches/gcc-4_6-branch/gcc/cp/class.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/50207] [4.7 Regression] G++ segv's on reduced test case
2011-08-27 4:49 [Bug c++/50207] New: G++ segv's on reduced test case bergner at gcc dot gnu.org
` (9 preceding siblings ...)
2011-08-30 21:51 ` jason at gcc dot gnu.org
@ 2011-09-08 18:33 ` bergner at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: bergner at gcc dot gnu.org @ 2011-09-08 18:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50207
--- Comment #10 from Peter Bergner <bergner at gcc dot gnu.org> 2011-09-08 18:09:02 UTC ---
Author: bergner
Date: Thu Sep 8 18:08:53 2011
New Revision: 178703
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178703
Log:
gcc/
Backport from mainline
2011-08-23 Jakub Jelinek <jakub@redhat.com>
PR c++/46862
* class.c (finish_struct_1): If TYPE_TRANSPARENT_AGGR is set on a type
which doesn't have any fields, clear it and diagnose.
2011-08-29 Jakub Jelinek <jakub@redhat.com>
Jason Merrill <jason@redhat.com>
PR c++/50207
* class.c (finish_struct_1): Complain if the first field is
artificial.
gcc/testsuite/
Backport from mainline
2011-08-23 Jakub Jelinek <jakub@redhat.com>
PR c++/46862
* g++.dg/dfp/nofields.C: New test.
2011-08-29 Jakub Jelinek <jakub@redhat.com>
Jason Merrill <jason@redhat.com>
PR c++/50207
* g++.dg/dfp/base.C: New test.
Added:
branches/ibm/gcc-4_5-branch/gcc/testsuite/g++.dg/dfp/base.C
branches/ibm/gcc-4_5-branch/gcc/testsuite/g++.dg/dfp/nofields.C
Modified:
branches/ibm/gcc-4_5-branch/gcc/ChangeLog.ibm
branches/ibm/gcc-4_5-branch/gcc/cp/class.c
branches/ibm/gcc-4_5-branch/gcc/testsuite/ChangeLog.ibm
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2011-09-08 18:11 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-27 4:49 [Bug c++/50207] New: G++ segv's on reduced test case bergner at gcc dot gnu.org
2011-08-27 6:12 ` [Bug c++/50207] " pinskia at gcc dot gnu.org
2011-08-27 8:02 ` [Bug c++/50207] [4.7 Regression] " rguenth at gcc dot gnu.org
2011-08-29 10:07 ` jakub at gcc dot gnu.org
2011-08-29 10:12 ` jakub at gcc dot gnu.org
2011-08-29 11:53 ` jakub at gcc dot gnu.org
2011-08-29 13:14 ` jakub at gcc dot gnu.org
2011-08-29 15:33 ` jason at gcc dot gnu.org
2011-08-30 4:33 ` jason at gcc dot gnu.org
2011-08-30 4:40 ` jason at gcc dot gnu.org
2011-08-30 21:51 ` jason at gcc dot gnu.org
2011-09-08 18:33 ` bergner at gcc dot gnu.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).