public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/13347] Incorrect code generated for reinterpret_cast<> of pointer-to-member
2003-12-07 22:20 [Bug optimization/13347] New: Incorrect code generated for reinterpret_cast<> of pointer-to-member bryner at brianryner dot com
@ 2003-12-07 22:20 ` bryner at brianryner dot com
2003-12-07 22:21 ` bryner at brianryner dot com
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bryner at brianryner dot com @ 2003-12-07 22:20 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13347
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug optimization/13347] New: Incorrect code generated for reinterpret_cast<> of pointer-to-member
@ 2003-12-07 22:20 bryner at brianryner dot com
2003-12-07 22:20 ` [Bug optimization/13347] " bryner at brianryner dot com
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: bryner at brianryner dot com @ 2003-12-07 22:20 UTC (permalink / raw)
To: gcc-bugs
If a pointer to member function is passed through reinterpret_cast<>, then
applying it to an object results in a crash. This happens at any optimization
level above -O0, but goes away with -fdisable-tree-ssa.
Testcase coming up.
--
Summary: Incorrect code generated for reinterpret_cast<> of
pointer-to-member
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: critical
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bryner at brianryner dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13347
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug optimization/13347] Incorrect code generated for reinterpret_cast<> of pointer-to-member
2003-12-07 22:20 [Bug optimization/13347] New: Incorrect code generated for reinterpret_cast<> of pointer-to-member bryner at brianryner dot com
2003-12-07 22:20 ` [Bug optimization/13347] " bryner at brianryner dot com
@ 2003-12-07 22:21 ` bryner at brianryner dot com
2003-12-07 22:26 ` [Bug optimization/13347] [tree-ssa] " pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bryner at brianryner dot com @ 2003-12-07 22:21 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bryner at brianryner dot com 2003-12-07 22:21 -------
Created an attachment (id=5296)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5296&action=view)
reduced testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13347
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug optimization/13347] [tree-ssa] Incorrect code generated for reinterpret_cast<> of pointer-to-member
2003-12-07 22:20 [Bug optimization/13347] New: Incorrect code generated for reinterpret_cast<> of pointer-to-member bryner at brianryner dot com
2003-12-07 22:20 ` [Bug optimization/13347] " bryner at brianryner dot com
2003-12-07 22:21 ` bryner at brianryner dot com
@ 2003-12-07 22:26 ` pinskia at gcc dot gnu dot org
2003-12-07 22:28 ` bryner at brianryner dot com
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-07 22:26 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|Incorrect code generated for|[tree-ssa] Incorrect code
|reinterpret_cast<> of |generated for
|pointer-to-member |reinterpret_cast<> of
| |pointer-to-member
Target Milestone|--- |tree-ssa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13347
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug optimization/13347] [tree-ssa] Incorrect code generated for reinterpret_cast<> of pointer-to-member
2003-12-07 22:20 [Bug optimization/13347] New: Incorrect code generated for reinterpret_cast<> of pointer-to-member bryner at brianryner dot com
` (2 preceding siblings ...)
2003-12-07 22:26 ` [Bug optimization/13347] [tree-ssa] " pinskia at gcc dot gnu dot org
@ 2003-12-07 22:28 ` bryner at brianryner dot com
2003-12-08 18:56 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bryner at brianryner dot com @ 2003-12-07 22:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bryner at brianryner dot com 2003-12-07 22:28 -------
Should have mentioned - this is with a tree-ssa-branch build pulled last night.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13347
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug optimization/13347] [tree-ssa] Incorrect code generated for reinterpret_cast<> of pointer-to-member
2003-12-07 22:20 [Bug optimization/13347] New: Incorrect code generated for reinterpret_cast<> of pointer-to-member bryner at brianryner dot com
` (3 preceding siblings ...)
2003-12-07 22:28 ` bryner at brianryner dot com
@ 2003-12-08 18:56 ` pinskia at gcc dot gnu dot org
2004-01-26 0:27 ` bryner at brianryner dot com
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-08 18:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-12-08 18:56 -------
Confirmed, this is caused somehow by sra.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |dnovillo at redhat dot com
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-12-08 18:56:20
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13347
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug optimization/13347] [tree-ssa] Incorrect code generated for reinterpret_cast<> of pointer-to-member
2003-12-07 22:20 [Bug optimization/13347] New: Incorrect code generated for reinterpret_cast<> of pointer-to-member bryner at brianryner dot com
` (4 preceding siblings ...)
2003-12-08 18:56 ` pinskia at gcc dot gnu dot org
@ 2004-01-26 0:27 ` bryner at brianryner dot com
2004-01-26 0:29 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bryner at brianryner dot com @ 2004-01-26 0:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bryner at brianryner dot com 2004-01-26 00:27 -------
Why was this marked known-to-work=tree-ssa? It's known to _fail_ on the tree-ssa
branch.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13347
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug optimization/13347] [tree-ssa] Incorrect code generated for reinterpret_cast<> of pointer-to-member
2003-12-07 22:20 [Bug optimization/13347] New: Incorrect code generated for reinterpret_cast<> of pointer-to-member bryner at brianryner dot com
` (5 preceding siblings ...)
2004-01-26 0:27 ` bryner at brianryner dot com
@ 2004-01-26 0:29 ` pinskia at gcc dot gnu dot org
2004-01-26 2:11 ` giovannibajo at libero dot it
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-26 0:29 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-26 00:29 -------
I made a mistake, it was an accident.
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |tree-ssa
Known to work|tree-ssa |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13347
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug optimization/13347] [tree-ssa] Incorrect code generated for reinterpret_cast<> of pointer-to-member
2003-12-07 22:20 [Bug optimization/13347] New: Incorrect code generated for reinterpret_cast<> of pointer-to-member bryner at brianryner dot com
` (6 preceding siblings ...)
2004-01-26 0:29 ` pinskia at gcc dot gnu dot org
@ 2004-01-26 2:11 ` giovannibajo at libero dot it
2004-02-27 12:41 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: giovannibajo at libero dot it @ 2004-01-26 2:11 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 427 bytes --]
------- Additional Comments From giovannibajo at libero dot it 2004-01-26 02:11 -------
By the way, since I was wondering, this is allowed by [expr.reinterpret.cast]/9
bullet 1: "converting an rvalue of type pointer to member function to a
different pointer to member function type and back to its original type yields
the original pointer to member value.".
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13347
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug optimization/13347] [tree-ssa] Incorrect code generated for reinterpret_cast<> of pointer-to-member
2003-12-07 22:20 [Bug optimization/13347] New: Incorrect code generated for reinterpret_cast<> of pointer-to-member bryner at brianryner dot com
` (7 preceding siblings ...)
2004-01-26 2:11 ` giovannibajo at libero dot it
@ 2004-02-27 12:41 ` cvs-commit at gcc dot gnu dot org
2004-02-27 12:42 ` dnovillo at gcc dot gnu dot org
2004-02-27 12:43 ` dnovillo at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-02-27 12:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-02-27 12:41 -------
Subject: Bug 13347
CVSROOT: /cvs/gcc
Module name: gcc
Branch: tree-ssa-20020619-branch
Changes by: dnovillo@gcc.gnu.org 2004-02-27 12:41:37
Modified files:
gcc : ChangeLog.tree-ssa tree-sra.c tree-ssa.c tree.h
Log message:
PR optimization/13347
* tree-sra.c (scalarize_structure_assignment): Use STRIP_NOPS
instead of STRIP_USELESS_TYPE_CONVERSION to remove type casts
from RHS of the assignment.
* tree-ssa.c (tree_ssa_useless_type_conversion_1): Reformat
and rephrase comments.
* tree.h (STRIP_USELESS_TYPE_CONVERSION): Reformat comment.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.tree-ssa.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.1230&r2=1.1.2.1231
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-sra.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.2.23&r2=1.1.2.24
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa.c.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.1.4.206&r2=1.1.4.207
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.h.diff?cvsroot=gcc&only_with_tag=tree-ssa-20020619-branch&r1=1.342.2.173&r2=1.342.2.174
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13347
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug optimization/13347] [tree-ssa] Incorrect code generated for reinterpret_cast<> of pointer-to-member
2003-12-07 22:20 [Bug optimization/13347] New: Incorrect code generated for reinterpret_cast<> of pointer-to-member bryner at brianryner dot com
` (8 preceding siblings ...)
2004-02-27 12:41 ` cvs-commit at gcc dot gnu dot org
@ 2004-02-27 12:42 ` dnovillo at gcc dot gnu dot org
2004-02-27 12:43 ` dnovillo at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2004-02-27 12:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dnovillo at gcc dot gnu dot org 2004-02-27 12:42 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13347
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug optimization/13347] [tree-ssa] Incorrect code generated for reinterpret_cast<> of pointer-to-member
2003-12-07 22:20 [Bug optimization/13347] New: Incorrect code generated for reinterpret_cast<> of pointer-to-member bryner at brianryner dot com
` (9 preceding siblings ...)
2004-02-27 12:42 ` dnovillo at gcc dot gnu dot org
@ 2004-02-27 12:43 ` dnovillo at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: dnovillo at gcc dot gnu dot org @ 2004-02-27 12:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dnovillo at gcc dot gnu dot org 2004-02-27 12:43 -------
Explanation of fix:
http://gcc.gnu.org/ml/gcc-patches/2004-02/msg02600.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13347
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2004-02-27 12:43 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-07 22:20 [Bug optimization/13347] New: Incorrect code generated for reinterpret_cast<> of pointer-to-member bryner at brianryner dot com
2003-12-07 22:20 ` [Bug optimization/13347] " bryner at brianryner dot com
2003-12-07 22:21 ` bryner at brianryner dot com
2003-12-07 22:26 ` [Bug optimization/13347] [tree-ssa] " pinskia at gcc dot gnu dot org
2003-12-07 22:28 ` bryner at brianryner dot com
2003-12-08 18:56 ` pinskia at gcc dot gnu dot org
2004-01-26 0:27 ` bryner at brianryner dot com
2004-01-26 0:29 ` pinskia at gcc dot gnu dot org
2004-01-26 2:11 ` giovannibajo at libero dot it
2004-02-27 12:41 ` cvs-commit at gcc dot gnu dot org
2004-02-27 12:42 ` dnovillo at gcc dot gnu dot org
2004-02-27 12:43 ` dnovillo 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).