public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/23984] New: second operand of PLUS_EXPR is NULL (in constructor)
@ 2005-09-20 17:45 amylaar at gcc dot gnu dot org
2005-09-20 17:48 ` [Bug c++/23984] " amylaar at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 12+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2005-09-20 17:45 UTC (permalink / raw)
To: gcc-bugs
cc1plus crashes for the testcase I'll attach later. There is a PLUS_EXPR, the
second operand of which is NULL. setting a breakpoint cgraph_lower_function
shows that the crash happens after cgraph_lower_function is called a second time;
moreover, the by probing the different addresses where the PLUS_EXPR ended up
during multiple runs, the offending PLUS_EXPR can be found at the start of
the second cgraph_lower_function call:
(gdb) p ((tree)0xb595ff9c)->common.code
$7 = PLUS_EXPR
(gdb) call debug_tree((tree)0xb595ff9c)
<plus_expr 0xb595ff9c
type <pointer_type 0xb595eb24
type <pointer_type 0xb593205c type <pointer_type 0xb5927f74 __vtbl_ptr_type>
sizes-gimplified unsigned SI
size <integer_cst 0xb58ab3f0 constant invariant 32>
unit size <integer_cst 0xb58ab180 constant invariant 4>
align 32 symtab 0 alias set -1
pointer_to_this <pointer_type 0xb595eb24>>
unsigned SI size <integer_cst 0xb58ab3f0 32> unit size <integer_cst
0xb58ab180 4>
align 32 symtab 0 alias set -1>
readonly
arg 0 <var_decl 0xb5961b00 __vtt_parm.7 type <pointer_type 0xb595eb24>
used unsigned ignored SI file foo.ii line 30 size <integer_cst
0xb58ab3f0 32> unit size <integer_cst 0xb58ab180 4>
align 32 context <function_decl 0xb5955580 __comp_ctor > abstract_origin
<var_decl 0xb595a9f8 __vtt_parm.7>
chain <var_decl 0xb5961b58 D.1949 type <pointer_type 0xb595eb24>
used unsigned ignored SI file foo.ii line 30 size <integer_cst
0xb58ab3f0 32> unit size <integer_cst 0xb58ab180 4>
align 32 context <function_decl 0xb5955580 __comp_ctor >
abstract_origin <var_decl 0xb595aa50 D.1901> chain <var_decl 0xb5961bb0 D.1950>>>>
Strangely enough, the this PLUS_EXPRESSION appears not to have been made by
make_node_stat.
--
Summary: second operand of PLUS_EXPR is NULL (in constructor)
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: amylaar at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23984
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/23984] second operand of PLUS_EXPR is NULL (in constructor)
2005-09-20 17:45 [Bug c++/23984] New: second operand of PLUS_EXPR is NULL (in constructor) amylaar at gcc dot gnu dot org
@ 2005-09-20 17:48 ` amylaar at gcc dot gnu dot org
2005-09-20 17:53 ` [Bug c++/23984] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2005-09-20 17:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From amylaar at gcc dot gnu dot org 2005-09-20 17:48 -------
Created an attachment (id=9781)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9781&action=view)
test case
This testcase triggers the bug with mainline gcc from 2005-09-19 18:00 UTC
at optimization level -O3 for i686-pc-linux-gnu and sh-elf targets.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23984
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/23984] [4.0/4.1 Regression] second operand of PLUS_EXPR is NULL (in constructor)
2005-09-20 17:45 [Bug c++/23984] New: second operand of PLUS_EXPR is NULL (in constructor) amylaar at gcc dot gnu dot org
2005-09-20 17:48 ` [Bug c++/23984] " amylaar at gcc dot gnu dot org
@ 2005-09-20 17:53 ` pinskia at gcc dot gnu dot org
2005-09-20 17:55 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-20 17:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-20 17:53 -------
Confirmed, a regression from 3.4.0.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Known to fail| |4.0.0 4.1.0
Known to work| |3.4.0
Last reconfirmed|0000-00-00 00:00:00 |2005-09-20 17:53:10
date| |
Summary|second operand of PLUS_EXPR |[4.0/4.1 Regression] second
|is NULL (in constructor) |operand of PLUS_EXPR is NULL
| |(in constructor)
Target Milestone|--- |4.0.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23984
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/23984] [4.0/4.1 Regression] second operand of PLUS_EXPR is NULL (in constructor)
2005-09-20 17:45 [Bug c++/23984] New: second operand of PLUS_EXPR is NULL (in constructor) amylaar at gcc dot gnu dot org
2005-09-20 17:48 ` [Bug c++/23984] " amylaar at gcc dot gnu dot org
2005-09-20 17:53 ` [Bug c++/23984] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-09-20 17:55 ` pinskia at gcc dot gnu dot org
2005-09-20 18:05 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-20 17:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-20 17:55 -------
It is in .t02.original:
((int (*__vtbl_ptr_type) (void) * *) __vtt_parm + )
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23984
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/23984] [4.0/4.1 Regression] second operand of PLUS_EXPR is NULL (in constructor)
2005-09-20 17:45 [Bug c++/23984] New: second operand of PLUS_EXPR is NULL (in constructor) amylaar at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-09-20 17:55 ` pinskia at gcc dot gnu dot org
@ 2005-09-20 18:05 ` pinskia at gcc dot gnu dot org
2005-09-21 14:32 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-20 18:05 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-20 18:04 -------
Here is a slightly reduced testcase:
struct b {
virtual int c (void) = 0;
};
struct d:virtual b {
d (void);
int c (void) ;
};
struct e {
e (b *f);
};
struct g : d, e {
g () : e (this) {}
};
g *a1 = new g ();
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23984
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/23984] [4.0/4.1 Regression] second operand of PLUS_EXPR is NULL (in constructor)
2005-09-20 17:45 [Bug c++/23984] New: second operand of PLUS_EXPR is NULL (in constructor) amylaar at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-09-20 18:05 ` pinskia at gcc dot gnu dot org
@ 2005-09-21 14:32 ` pinskia at gcc dot gnu dot org
2005-09-21 17:08 ` janis187 at us dot ibm dot com
2005-09-27 16:22 ` mmitchel at gcc dot gnu dot org
6 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-21 14:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-09-21 14:32 -------
: Search converges between 2004-08-30-trunk (#529) and 2004-08-31-trunk (#530).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23984
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/23984] [4.0/4.1 Regression] second operand of PLUS_EXPR is NULL (in constructor)
2005-09-20 17:45 [Bug c++/23984] New: second operand of PLUS_EXPR is NULL (in constructor) amylaar at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-09-21 14:32 ` pinskia at gcc dot gnu dot org
@ 2005-09-21 17:08 ` janis187 at us dot ibm dot com
2005-09-27 16:22 ` mmitchel at gcc dot gnu dot org
6 siblings, 0 replies; 12+ messages in thread
From: janis187 at us dot ibm dot com @ 2005-09-21 17:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From janis187 at us dot ibm dot com 2005-09-21 17:07 -------
Reghunt found this patch from nathan:
http://gcc.gnu.org/ml/gcc-cvs/2004-08/msg01511.html
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |nathan at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23984
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/23984] [4.0/4.1 Regression] second operand of PLUS_EXPR is NULL (in constructor)
2005-09-20 17:45 [Bug c++/23984] New: second operand of PLUS_EXPR is NULL (in constructor) amylaar at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-09-21 17:08 ` janis187 at us dot ibm dot com
@ 2005-09-27 16:22 ` mmitchel at gcc dot gnu dot org
6 siblings, 0 replies; 12+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 16:22 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.0.2 |4.0.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23984
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/23984] [4.0/4.1 Regression] second operand of PLUS_EXPR is NULL (in constructor)
[not found] <bug-23984-5394@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2005-10-14 8:41 ` cvs-commit at gcc dot gnu dot org
@ 2005-10-14 8:43 ` nathan at gcc dot gnu dot org
3 siblings, 0 replies; 12+ messages in thread
From: nathan at gcc dot gnu dot org @ 2005-10-14 8:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from nathan at gcc dot gnu dot org 2005-10-14 08:43 -------
fixed mainline & 4.0
2005-10-13 Nathan Sidwell <nathan@codesourcery.com>
PR c++/23984
* class.c (build_base_path): The vtable is always the first thing
in the vtt.
--
nathan at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23984
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/23984] [4.0/4.1 Regression] second operand of PLUS_EXPR is NULL (in constructor)
[not found] <bug-23984-5394@http.gcc.gnu.org/bugzilla/>
2005-10-12 17:20 ` nathan at gcc dot gnu dot org
2005-10-14 8:39 ` cvs-commit at gcc dot gnu dot org
@ 2005-10-14 8:41 ` cvs-commit at gcc dot gnu dot org
2005-10-14 8:43 ` nathan at gcc dot gnu dot org
3 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-14 8:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from cvs-commit at gcc dot gnu dot org 2005-10-14 08:41 -------
Subject: Bug 23984
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: nathan@gcc.gnu.org 2005-10-14 08:41:39
Modified files:
gcc/cp : ChangeLog class.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/init: ctor7.C
Log message:
cp:
PR c++/23984
* class.c (build_base_path): The vtable is always the first thing
in the vtt.
testsuite:
PR c++/23984
* g++.dg/init/ctor7.C: New.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.4648.2.131&r2=1.4648.2.132
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.707.2.6&r2=1.707.2.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.454&r2=1.5084.2.455
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/ctor7.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23984
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/23984] [4.0/4.1 Regression] second operand of PLUS_EXPR is NULL (in constructor)
[not found] <bug-23984-5394@http.gcc.gnu.org/bugzilla/>
2005-10-12 17:20 ` nathan at gcc dot gnu dot org
@ 2005-10-14 8:39 ` cvs-commit at gcc dot gnu dot org
2005-10-14 8:41 ` cvs-commit at gcc dot gnu dot org
2005-10-14 8:43 ` nathan at gcc dot gnu dot org
3 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-10-14 8:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from cvs-commit at gcc dot gnu dot org 2005-10-14 08:39 -------
Subject: Bug 23984
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: nathan@gcc.gnu.org 2005-10-14 08:38:59
Modified files:
gcc/cp : ChangeLog class.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/init: ctor7.C
Log message:
cp:
PR c++/23984
* class.c (build_base_path): The vtable is always the first thing
in the vtt.
testsuite:
PR c++/23984
* g++.dg/init/ctor7.C: New.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4930&r2=1.4931
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&r1=1.735&r2=1.736
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6189&r2=1.6190
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/ctor7.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23984
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/23984] [4.0/4.1 Regression] second operand of PLUS_EXPR is NULL (in constructor)
[not found] <bug-23984-5394@http.gcc.gnu.org/bugzilla/>
@ 2005-10-12 17:20 ` nathan at gcc dot gnu dot org
2005-10-14 8:39 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 12+ messages in thread
From: nathan at gcc dot gnu dot org @ 2005-10-12 17:20 UTC (permalink / raw)
To: gcc-bugs
--
nathan at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |nathan at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2005-09-20 17:53:10 |2005-10-12 17:20:53
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23984
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2005-10-14 8:43 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-20 17:45 [Bug c++/23984] New: second operand of PLUS_EXPR is NULL (in constructor) amylaar at gcc dot gnu dot org
2005-09-20 17:48 ` [Bug c++/23984] " amylaar at gcc dot gnu dot org
2005-09-20 17:53 ` [Bug c++/23984] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-09-20 17:55 ` pinskia at gcc dot gnu dot org
2005-09-20 18:05 ` pinskia at gcc dot gnu dot org
2005-09-21 14:32 ` pinskia at gcc dot gnu dot org
2005-09-21 17:08 ` janis187 at us dot ibm dot com
2005-09-27 16:22 ` mmitchel at gcc dot gnu dot org
[not found] <bug-23984-5394@http.gcc.gnu.org/bugzilla/>
2005-10-12 17:20 ` nathan at gcc dot gnu dot org
2005-10-14 8:39 ` cvs-commit at gcc dot gnu dot org
2005-10-14 8:41 ` cvs-commit at gcc dot gnu dot org
2005-10-14 8:43 ` nathan 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).