public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19666] New: ICE in fold_convert
@ 2005-01-28 9:30 jakub at gcc dot gnu dot org
2005-01-28 9:49 ` [Bug c++/19666] " steven at gcc dot gnu dot org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-01-28 9:30 UTC (permalink / raw)
To: gcc-bugs
struct L { void *a; };
struct S {
static S *foo (L *x)
{
return (S *) ((char *) x - (unsigned long) &(((S *) 0)->*&S::a));
}
L a;
};
causes ICE in fold_convert (abort at the very end of the function).
Works fine with G++ 3.2.3-RH and HEAD.
Breakpoint 2, fold_convert (type=0x2a97b66d00, arg=0x2a97d65c60) at
../../gcc/fold-const.c:1917
1917 abort ();
(gdb) p debug_tree(type)
<integer_type 0x2a97b66d00 long int DI
size <integer_cst 0x2a97b64930 type <integer_type 0x2a97b78410 bit_size_type>
constant 64>
unit size <integer_cst 0x2a97b64a80 type <integer_type 0x2a97b78340 long
unsigned int> constant 8>
align 64 symtab 0 alias set -1 precision 64 min <integer_cst 0x2a97b64a20
-9223372036854775808> max <integer_cst 0x2a97b64a50 9223372036854775807>>
$1 = void
(gdb) p debug_tree(arg)
<negate_expr 0x2a97d65c60
type <offset_type 0x2a97d63820
type <record_type 0x2a97d58680 L type_1 type_5 DI
size <integer_cst 0x2a97b749c0 constant 64>
unit size <integer_cst 0x2a97b74a80 constant 8>
align 64 symtab 0 alias set -1 fields <field_decl 0x2a97d589c0 a>
X() X(constX&) this=(X&) n_parents 0 use_template=0 interface-unknown
member-functions <tree_vec 0x2a97d5d980
elt 0 <overload 0x2a97d50fc0>
elt 2 <function_decl 0x2a97d5fa90 operator=>
elt 3 <overload 0x2a97d61040>
elt 4 <overload 0x2a97d61000>>
pointer_to_this <pointer_type 0x2a97d58750> reference_to_this
<reference_type 0x2a97d5f680> chain <type_decl 0x2a97d58820 L>>
DI size <integer_cst 0x2a97b749c0 64> unit size <integer_cst 0x2a97b74a80
8>
align 64 symtab 0 alias set -1 basetype <record_type 0x2a97d604e0 S>>
constant
arg 0 <ptrmem_cst 0x2a97d658a0 type <offset_type 0x2a97d63820>
constant>>
$2 = void
--
Summary: ICE in fold_convert
Product: gcc
Version: 3.4.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19666] ICE in fold_convert
2005-01-28 9:30 [Bug c++/19666] New: ICE in fold_convert jakub at gcc dot gnu dot org
@ 2005-01-28 9:49 ` steven at gcc dot gnu dot org
2005-01-28 10:02 ` jakub at gcc dot gnu dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-28 9:49 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2005-01-28 09:49 -------
Hmm, what target, what options did you use?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19666] ICE in fold_convert
2005-01-28 9:30 [Bug c++/19666] New: ICE in fold_convert jakub at gcc dot gnu dot org
2005-01-28 9:49 ` [Bug c++/19666] " steven at gcc dot gnu dot org
@ 2005-01-28 10:02 ` jakub at gcc dot gnu dot org
2005-01-28 14:06 ` [Bug c++/19666] [3.4 Regression] " pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-01-28 10:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jakub at gcc dot gnu dot org 2005-01-28 10:01 -------
Any target I have tried, any options.
It fails at least on {i386,x86_64,ppc,ppc64,s390,s390x}-redhat-linux,
with -O{0,1,2,3,s}.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19666] [3.4 Regression] ICE in fold_convert
2005-01-28 9:30 [Bug c++/19666] New: ICE in fold_convert jakub at gcc dot gnu dot org
2005-01-28 9:49 ` [Bug c++/19666] " steven at gcc dot gnu dot org
2005-01-28 10:02 ` jakub at gcc dot gnu dot org
@ 2005-01-28 14:06 ` pinskia at gcc dot gnu dot org
2005-01-28 14:08 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-28 14:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-28 14:06 -------
Started to be rejected (on the mainline at the time):
: Search converges between 2003-07-23-trunk (#302) and 2003-07-24-trunk (#303).
Started to ICE:
: Search converges between 2004-02-02-3.4 (#1) and 2004-03-01-3.4 (#2).
: Search converges between 2004-02-01-trunk (#445) and 2004-03-01-trunk (#446).
Started to pass on the mainline:
: Search converges between 2004-06-08-trunk (#463) and 2004-06-10-trunk (#464).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code, rejects-
| |valid
Last reconfirmed|0000-00-00 00:00:00 |2005-01-28 14:06:07
date| |
Summary|ICE in fold_convert |[3.4 Regression] ICE in
| |fold_convert
Target Milestone|--- |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19666] [3.4 Regression] ICE in fold_convert
2005-01-28 9:30 [Bug c++/19666] New: ICE in fold_convert jakub at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-01-28 14:06 ` [Bug c++/19666] [3.4 Regression] " pinskia at gcc dot gnu dot org
@ 2005-01-28 14:08 ` pinskia at gcc dot gnu dot org
2005-02-11 2:07 ` [Bug c++/19666] [3.3/3.4 Regression] Trouble with prt-to-members: rejects-valid/ICE " reichelt at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-28 14:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-28 14:07 -------
I think this patch fixes the problem but I don't have time to back port it:
2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
* fold-const.c (fold_convert): Treat OFFSET_TYPE like
POINTER_TYPE and INTEGER_TYPE.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19666] [3.3/3.4 Regression] Trouble with prt-to-members: rejects-valid/ICE in fold_convert
2005-01-28 9:30 [Bug c++/19666] New: ICE in fold_convert jakub at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-01-28 14:08 ` pinskia at gcc dot gnu dot org
@ 2005-02-11 2:07 ` reichelt at gcc dot gnu dot org
2005-02-11 16:40 ` jakub at gcc dot gnu dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-02-11 2:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-02-10 22:38 -------
Here's a reduced example without casts and dereferencing the null-pointer:
====================================
struct A
{
int i;
};
int foo(A *p)
{
return &p->i - &(p->*&A::i);
}
====================================
This valid code snippet is rejected on the 3.3 branch.
It causes an ICE in fold_convert on the 3.4 branch.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
Keywords| |monitored
Known to fail| |3.3 3.3.5 3.4.0 3.4.3
Known to work| |3.2.3 4.0.0
Summary|[3.4 Regression] ICE in |[3.3/3.4 Regression] Trouble
|fold_convert |with prt-to-members:
| |rejects-valid/ICE in
| |fold_convert
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19666] [3.3/3.4 Regression] Trouble with prt-to-members: rejects-valid/ICE in fold_convert
2005-01-28 9:30 [Bug c++/19666] New: ICE in fold_convert jakub at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-02-11 2:07 ` [Bug c++/19666] [3.3/3.4 Regression] Trouble with prt-to-members: rejects-valid/ICE " reichelt at gcc dot gnu dot org
@ 2005-02-11 16:40 ` jakub at gcc dot gnu dot org
2005-02-12 3:28 ` cvs-commit at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-02-11 16:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From jakub at gcc dot gnu dot org 2005-02-11 09:55 -------
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2005-02/msg00494.html>
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19666] [3.3/3.4 Regression] Trouble with prt-to-members: rejects-valid/ICE in fold_convert
2005-01-28 9:30 [Bug c++/19666] New: ICE in fold_convert jakub at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-02-11 16:40 ` jakub at gcc dot gnu dot org
@ 2005-02-12 3:28 ` cvs-commit at gcc dot gnu dot org
2005-02-12 3:50 ` cvs-commit at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-12 3:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-02-11 21:10 -------
Subject: Bug 19666
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: jakub@gcc.gnu.org 2005-02-11 21:10:16
Modified files:
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/other: ptrmem6.C
Log message:
PR c++/19666
2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
* fold-const.c (fold_convert): Treat OFFSET_TYPE like
POINTER_TYPE and INTEGER_TYPE.
* gcc/testsuite/g++.dg/other/ptrmem6.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5018&r2=1.5019
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/other/ptrmem6.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19666] [3.3/3.4 Regression] Trouble with prt-to-members: rejects-valid/ICE in fold_convert
2005-01-28 9:30 [Bug c++/19666] New: ICE in fold_convert jakub at gcc dot gnu dot org
` (6 preceding siblings ...)
2005-02-12 3:28 ` cvs-commit at gcc dot gnu dot org
@ 2005-02-12 3:50 ` cvs-commit at gcc dot gnu dot org
2005-02-12 4:00 ` [Bug c++/19666] [3.3 " pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-12 3:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-02-11 21:13 -------
Subject: Bug 19666
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-3_4-branch
Changes by: jakub@gcc.gnu.org 2005-02-11 21:12:56
Modified files:
gcc : ChangeLog fold-const.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/other: ptrmem6.C
Log message:
PR c++/19666
2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
* fold-const.c (fold_convert): Treat OFFSET_TYPE like
POINTER_TYPE and INTEGER_TYPE.
* gcc/testsuite/g++.dg/other/ptrmem6.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.797&r2=2.2326.2.798
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fold-const.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.322.2.15&r2=1.322.2.16
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.360&r2=1.3389.2.361
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/other/ptrmem6.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19666] [3.3 Regression] Trouble with prt-to-members: rejects-valid/ICE in fold_convert
2005-01-28 9:30 [Bug c++/19666] New: ICE in fold_convert jakub at gcc dot gnu dot org
` (7 preceding siblings ...)
2005-02-12 3:50 ` cvs-commit at gcc dot gnu dot org
@ 2005-02-12 4:00 ` pinskia at gcc dot gnu dot org
2005-04-30 14:46 ` gdr at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-12 4:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-11 21:15 -------
Fixed in the 3.4 branch, it is a rejects valid for the 3.3 branch but most likely will not get fixed there as
many different places call convert instead of fold_convert on the 3.3 branch compared to the 3.4/4.0.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-valid-code, patch |
Known to work|3.2.3 4.0.0 |3.2.3 4.0.0 3.4.4
Summary|[3.3/3.4 Regression] Trouble|[3.3 Regression] Trouble
|with prt-to-members: |with prt-to-members:
|rejects-valid/ICE in |rejects-valid/ICE in
|fold_convert |fold_convert
Target Milestone|3.4.4 |3.3.6
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19666] [3.3 Regression] Trouble with prt-to-members: rejects-valid/ICE in fold_convert
2005-01-28 9:30 [Bug c++/19666] New: ICE in fold_convert jakub at gcc dot gnu dot org
` (8 preceding siblings ...)
2005-02-12 4:00 ` [Bug c++/19666] [3.3 " pinskia at gcc dot gnu dot org
@ 2005-04-30 14:46 ` gdr at gcc dot gnu dot org
2005-04-30 16:33 ` gdr at gcc dot gnu dot org
2005-05-02 11:03 ` reichelt at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: gdr at gcc dot gnu dot org @ 2005-04-30 14:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at gcc dot gnu dot org 2005-04-30 14:46 -------
fixed in 3.4.4. Won't fix for 3.3.6
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|3.3.6 |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19666] [3.3 Regression] Trouble with prt-to-members: rejects-valid/ICE in fold_convert
2005-01-28 9:30 [Bug c++/19666] New: ICE in fold_convert jakub at gcc dot gnu dot org
` (9 preceding siblings ...)
2005-04-30 14:46 ` gdr at gcc dot gnu dot org
@ 2005-04-30 16:33 ` gdr at gcc dot gnu dot org
2005-05-02 11:03 ` reichelt at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: gdr at gcc dot gnu dot org @ 2005-04-30 16:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at gcc dot gnu dot org 2005-04-30 16:33 -------
Fixed in 3.4.3. Won't fix for 3.3.6.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.4 |3.4.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19666
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/19666] [3.3 Regression] Trouble with prt-to-members: rejects-valid/ICE in fold_convert
2005-01-28 9:30 [Bug c++/19666] New: ICE in fold_convert jakub at gcc dot gnu dot org
` (10 preceding siblings ...)
2005-04-30 16:33 ` gdr at gcc dot gnu dot org
@ 2005-05-02 11:03 ` reichelt at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-05-02 11:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-05-02 11:03 -------
The snippet from comment #5 crashes in gcc 3.4.3.
Really fixed in 3.4.4.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.4.3 |3.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19666
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2005-05-02 11:03 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-28 9:30 [Bug c++/19666] New: ICE in fold_convert jakub at gcc dot gnu dot org
2005-01-28 9:49 ` [Bug c++/19666] " steven at gcc dot gnu dot org
2005-01-28 10:02 ` jakub at gcc dot gnu dot org
2005-01-28 14:06 ` [Bug c++/19666] [3.4 Regression] " pinskia at gcc dot gnu dot org
2005-01-28 14:08 ` pinskia at gcc dot gnu dot org
2005-02-11 2:07 ` [Bug c++/19666] [3.3/3.4 Regression] Trouble with prt-to-members: rejects-valid/ICE " reichelt at gcc dot gnu dot org
2005-02-11 16:40 ` jakub at gcc dot gnu dot org
2005-02-12 3:28 ` cvs-commit at gcc dot gnu dot org
2005-02-12 3:50 ` cvs-commit at gcc dot gnu dot org
2005-02-12 4:00 ` [Bug c++/19666] [3.3 " pinskia at gcc dot gnu dot org
2005-04-30 14:46 ` gdr at gcc dot gnu dot org
2005-04-30 16:33 ` gdr at gcc dot gnu dot org
2005-05-02 11:03 ` 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).