public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/20458] New: [4.1 regression] structure aliasing causes wrong code
@ 2005-03-13 17:02 belyshev at depni dot sinp dot msu dot ru
2005-03-13 17:02 ` [Bug tree-optimization/20458] " belyshev at depni dot sinp dot msu dot ru
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: belyshev at depni dot sinp dot msu dot ru @ 2005-03-13 17:02 UTC (permalink / raw)
To: gcc-bugs
$ g++ bug.cc -O2
$ ./a.out
Segmentation fault
$ g++ bug.cc -O2 -fno-tree-salias
$ ./a.out
$
testcase:
------------------------------------------------------------------------------
#include <sstream>
void foo ()
{
std::stringbuf b;
}
int main()
{
foo ();
return 0;
}
------------------------------------------------------------------------------
--
Summary: [4.1 regression] structure aliasing causes wrong code
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: critical
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: belyshev at depni dot sinp dot msu dot ru
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20458
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/20458] [4.1 regression] structure aliasing causes wrong code
2005-03-13 17:02 [Bug tree-optimization/20458] New: [4.1 regression] structure aliasing causes wrong code belyshev at depni dot sinp dot msu dot ru
@ 2005-03-13 17:02 ` belyshev at depni dot sinp dot msu dot ru
2005-03-13 17:04 ` belyshev at depni dot sinp dot msu dot ru
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: belyshev at depni dot sinp dot msu dot ru @ 2005-03-13 17:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From belyshev at depni dot sinp dot msu dot ru 2005-03-13 17:02 -------
working on smaller preprocessed testcase (640Kbytes left).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20458
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/20458] [4.1 regression] structure aliasing causes wrong code
2005-03-13 17:02 [Bug tree-optimization/20458] New: [4.1 regression] structure aliasing causes wrong code belyshev at depni dot sinp dot msu dot ru
2005-03-13 17:02 ` [Bug tree-optimization/20458] " belyshev at depni dot sinp dot msu dot ru
@ 2005-03-13 17:04 ` belyshev at depni dot sinp dot msu dot ru
2005-03-13 17:38 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: belyshev at depni dot sinp dot msu dot ru @ 2005-03-13 17:04 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |dberlin at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20458
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/20458] [4.1 regression] structure aliasing causes wrong code
2005-03-13 17:02 [Bug tree-optimization/20458] New: [4.1 regression] structure aliasing causes wrong code belyshev at depni dot sinp dot msu dot ru
2005-03-13 17:02 ` [Bug tree-optimization/20458] " belyshev at depni dot sinp dot msu dot ru
2005-03-13 17:04 ` belyshev at depni dot sinp dot msu dot ru
@ 2005-03-13 17:38 ` pinskia at gcc dot gnu dot org
2005-03-13 18:18 ` belyshev at depni dot sinp dot msu dot ru
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-13 17:38 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20458
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/20458] [4.1 regression] structure aliasing causes wrong code
2005-03-13 17:02 [Bug tree-optimization/20458] New: [4.1 regression] structure aliasing causes wrong code belyshev at depni dot sinp dot msu dot ru
` (2 preceding siblings ...)
2005-03-13 17:38 ` pinskia at gcc dot gnu dot org
@ 2005-03-13 18:18 ` belyshev at depni dot sinp dot msu dot ru
2005-03-13 19:10 ` belyshev at depni dot sinp dot msu dot ru
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: belyshev at depni dot sinp dot msu dot ru @ 2005-03-13 18:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From belyshev at depni dot sinp dot msu dot ru 2005-03-13 18:18 -------
Created an attachment (id=8383)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8383&action=view)
smaller testcase (2293 bytes)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20458
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/20458] [4.1 regression] structure aliasing causes wrong code
2005-03-13 17:02 [Bug tree-optimization/20458] New: [4.1 regression] structure aliasing causes wrong code belyshev at depni dot sinp dot msu dot ru
` (3 preceding siblings ...)
2005-03-13 18:18 ` belyshev at depni dot sinp dot msu dot ru
@ 2005-03-13 19:10 ` belyshev at depni dot sinp dot msu dot ru
2005-03-13 19:20 ` dberlin at gcc dot gnu dot org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: belyshev at depni dot sinp dot msu dot ru @ 2005-03-13 19:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From belyshev at depni dot sinp dot msu dot ru 2005-03-13 19:10 -------
even smaller testcase:
------------------------------------------------------------------------------
namespace std
{
class locale
{
public:
locale();
~locale();
};
}
struct B
{
std::locale _M_buf_locale;
virtual ~B() {}
};
struct C : public B
{
char *s;
};
void foo ()
{
C c;
}
int main()
{
foo ();
return 0;
}
------------------------------------------------------------------------------
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20458
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/20458] [4.1 regression] structure aliasing causes wrong code
2005-03-13 17:02 [Bug tree-optimization/20458] New: [4.1 regression] structure aliasing causes wrong code belyshev at depni dot sinp dot msu dot ru
` (4 preceding siblings ...)
2005-03-13 19:10 ` belyshev at depni dot sinp dot msu dot ru
@ 2005-03-13 19:20 ` dberlin at gcc dot gnu dot org
2005-03-13 21:01 ` dberlin at gcc dot gnu dot org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2005-03-13 19:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dberlin at gcc dot gnu dot org 2005-03-13 19:20 -------
I can't reproduce on i686-pc-linux-gnu with either testcase
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.1.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20458
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/20458] [4.1 regression] structure aliasing causes wrong code
2005-03-13 17:02 [Bug tree-optimization/20458] New: [4.1 regression] structure aliasing causes wrong code belyshev at depni dot sinp dot msu dot ru
` (5 preceding siblings ...)
2005-03-13 19:20 ` dberlin at gcc dot gnu dot org
@ 2005-03-13 21:01 ` dberlin at gcc dot gnu dot org
2005-03-13 21:03 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2005-03-13 21:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dberlin at gcc dot gnu dot org 2005-03-13 21:01 -------
Confirmed on x86-64.
I'm bootstrapping a fix for this.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |dberlin at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-03-13 21:01:42
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20458
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/20458] [4.1 regression] structure aliasing causes wrong code
2005-03-13 17:02 [Bug tree-optimization/20458] New: [4.1 regression] structure aliasing causes wrong code belyshev at depni dot sinp dot msu dot ru
` (6 preceding siblings ...)
2005-03-13 21:01 ` dberlin at gcc dot gnu dot org
@ 2005-03-13 21:03 ` pinskia at gcc dot gnu dot org
2005-03-15 1:26 ` cvs-commit at gcc dot gnu dot org
2005-03-15 1:27 ` dberlin at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-13 21:03 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20458
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/20458] [4.1 regression] structure aliasing causes wrong code
2005-03-13 17:02 [Bug tree-optimization/20458] New: [4.1 regression] structure aliasing causes wrong code belyshev at depni dot sinp dot msu dot ru
` (7 preceding siblings ...)
2005-03-13 21:03 ` pinskia at gcc dot gnu dot org
@ 2005-03-15 1:26 ` cvs-commit at gcc dot gnu dot org
2005-03-15 1:27 ` dberlin at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-03-15 1:26 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-03-15 01:26 -------
Subject: Bug 20458
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: dberlin@gcc.gnu.org 2005-03-15 01:26:35
Modified files:
gcc : ChangeLog tree-flow-inline.h
tree-ssa-operands.c tree-tailcall.c
Added files:
gcc/testsuite/g++.dg/tree-ssa: pr20458.C
Log message:
2005-03-14 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/20458
* tree-flow-inline.h (mark_call_clobbered): Don't fiddle
DECL_EXTERNAL on STRUCT_FIELD tags.
(clear_call_clobbered): Ditto.
* tree-ssa-operands.c (note_addressable): Make sure the original
variable doesn't slip into the addressable list if we have
subvars.
* tree-tailcall.c (suitable_for_tail_opt_p): Look at STRUCT_FIELD
tags too.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7854&r2=2.7855
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-flow-inline.h.diff?cvsroot=gcc&r1=2.32&r2=2.33
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-operands.c.diff?cvsroot=gcc&r1=2.67&r2=2.68
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-tailcall.c.diff?cvsroot=gcc&r1=2.37&r2=2.38
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/tree-ssa/pr20458.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20458
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/20458] [4.1 regression] structure aliasing causes wrong code
2005-03-13 17:02 [Bug tree-optimization/20458] New: [4.1 regression] structure aliasing causes wrong code belyshev at depni dot sinp dot msu dot ru
` (8 preceding siblings ...)
2005-03-15 1:26 ` cvs-commit at gcc dot gnu dot org
@ 2005-03-15 1:27 ` dberlin at gcc dot gnu dot org
9 siblings, 0 replies; 11+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2005-03-15 1:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dberlin at gcc dot gnu dot org 2005-03-15 01:27 -------
Fixed
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20458
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-03-15 1:27 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-13 17:02 [Bug tree-optimization/20458] New: [4.1 regression] structure aliasing causes wrong code belyshev at depni dot sinp dot msu dot ru
2005-03-13 17:02 ` [Bug tree-optimization/20458] " belyshev at depni dot sinp dot msu dot ru
2005-03-13 17:04 ` belyshev at depni dot sinp dot msu dot ru
2005-03-13 17:38 ` pinskia at gcc dot gnu dot org
2005-03-13 18:18 ` belyshev at depni dot sinp dot msu dot ru
2005-03-13 19:10 ` belyshev at depni dot sinp dot msu dot ru
2005-03-13 19:20 ` dberlin at gcc dot gnu dot org
2005-03-13 21:01 ` dberlin at gcc dot gnu dot org
2005-03-13 21:03 ` pinskia at gcc dot gnu dot org
2005-03-15 1:26 ` cvs-commit at gcc dot gnu dot org
2005-03-15 1:27 ` dberlin 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).