Bug 16129 - [3.4.1 regression] g++.old-deja/g++.eh/catch[35679]*.C
Summary: [3.4.1 regression] g++.old-deja/g++.eh/catch[35679]*.C
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.4.0
: P2 normal
Target Milestone: 3.4.1
Assignee: Mark Mitchell
URL:
Keywords: wrong-code
Depends on:
Blocks:
 
Reported: 2004-06-22 07:04 UTC by Zack Weinberg
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host:
Target: ia64-hp-hpux11.*
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
changes which introduced bug (7.24 KB, text/plain)
2004-06-23 16:36 UTC, Zack Weinberg
Details
preprocessed source for file being miscompiled (5.38 KB, text/plain)
2004-06-24 21:40 UTC, Zack Weinberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zack Weinberg 2004-06-22 07:04:29 UTC
New failures on the 3.4 branch:

FAIL: g++.old-deja/g++.eh/catch3.C execution test
FAIL: g++.old-deja/g++.eh/catch3p.C execution test
FAIL: g++.old-deja/g++.eh/catch5.C execution test
FAIL: g++.old-deja/g++.eh/catch5p.C execution test
FAIL: g++.old-deja/g++.eh/catch6.C execution test
FAIL: g++.old-deja/g++.eh/catch6p.C execution test
FAIL: g++.old-deja/g++.eh/catch7.C execution test
FAIL: g++.old-deja/g++.eh/catch7p.C execution test
FAIL: g++.old-deja/g++.eh/catch9.C execution test
FAIL: g++.old-deja/g++.eh/catch9p.C execution test

These occur in 32-bit mode only.
Comment 1 Zack Weinberg 2004-06-22 07:05:48 UTC
targeting to 3.4.1 per mark's request.
Comment 2 Andrew Pinski 2004-06-22 07:07:34 UTC
This seems pretty bad really.
Comment 3 Zack Weinberg 2004-06-23 16:36:30 UTC
Created attachment 6611 [details]
changes which introduced bug

Binary search fingers one of these changes:

2004-05-24  Benjamin Kosnik  <bkoz@redhat.com>

       * testsuite/testsuite_hooks.h (func_callback): Declare copy
       constructor and assignment operator private.
       * testsuite/23_containers/deque/cons/clear_allocator.cc: Match
       exception specifications of base class.
       * testsuite/23_containers/list/cons/clear_allocator.cc: Same.
       * testsuite/23_containers/vector/cons/clear_allocator.cc: Same.
       * testsuite/23_containers/vector/bool/clear_allocator.cc: New.

2004-05-24  Benjamin Kosnik  <bkoz@redhat.com>

       * libsupc++/cxxabi.h: Remove duplicated and useless public and
	private keywords in class declarations. Format. Use
	stddef.h. Expose declarations to "C" compilation.
	* libsupc++/tinfo.cc (__upcast_result): Add copy constructor and
	assignment operator.
	(__dyncast_result): Same.
	* libsupc++/vec.cc (uncatch_exception): Same, use member
	initialization list.
Comment 4 Zack Weinberg 2004-06-24 21:40:27 UTC
Created attachment 6623 [details]
preprocessed source for file being miscompiled

Compile this file as follows:

cc1plus -fpreprocessed tinfo.ii -quiet -dumpbase tinfo.cc -da -auxbase-strip
tinfo.o -g -g -O2 -O2 -O2 -Wall -W -Wwrite-strings -Wcast-qual -version
-fno-implicit-templates -fdiagnostics-show-location=once -ffunction-sections
-fdata-sections -fPIC -o tinfo.s

(a cross compiler to ia64-hp-hpux11.22 will do).  Then compare the .31.bbro and
.35.mach dumps.  You should see that in the former, insn 456 precedes insn 493,
but in the latter, insn 456 follows insn 493.  Since insn 493 reads from the
location written by insn 456, this is an invalid transformation.

The problem is believed to be a bad interaction between aliasing and inlining.
Comment 5 Mark Mitchell 2004-06-25 07:28:37 UTC
Working on a fix.
Comment 6 GCC Commits 2004-06-25 19:16:23 UTC
Subject: Bug 16129

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	mmitchel@gcc.gnu.org	2004-06-25 19:15:53

Modified files:
	gcc            : ChangeLog alias.c 

Log message:
	PR wrong-code/16129
	* alias.c (get_alias_set): Adjust setting of
	DECL_POINTER_ALIAS_SET for pointers to aggregates.

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.522&r2=2.2326.2.523
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/alias.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.209.2.6&r2=1.209.2.7

Comment 7 GCC Commits 2004-06-25 19:17:59 UTC
Subject: Bug 16129

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-06-25 19:17:51

Modified files:
	gcc            : ChangeLog alias.c 

Log message:
	PR wrong-code/16129
	* alias.c (get_alias_set): Adjust setting of
	DECL_POINTER_ALIAS_SET for pointers to aggregates.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.4150&r2=2.4151
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/alias.c.diff?cvsroot=gcc&r1=1.230&r2=1.231

Comment 8 Mark Mitchell 2004-06-25 19:35:15 UTC
Fixed in GCC 3.4.1.