Bug 48479 - [4.7 Regression] Many ICEs in the obj-c++.dg test suite on *-apple-darwin*
Summary: [4.7 Regression] Many ICEs in the obj-c++.dg test suite on *-apple-darwin*
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: objc++ (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-06 12:27 UTC by Dominique d'Humieres
Modified: 2011-04-14 18:48 UTC (History)
3 users (show)

See Also:
Host: *-apple-darwin*
Target: *-apple-darwin*
Build: *-apple-darwin*
Known to work:
Known to fail:
Last reconfirmed: 2011-04-06 14:58:01


Attachments
untested patch (297 bytes, patch)
2011-04-06 13:41 UTC, Nathan Froyd
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique d'Humieres 2011-04-06 12:27:55 UTC
Between revisions 171800 and 171957 many failures appeared in the obj-c++.dg test suite on *-apple-darwin*(see http://gcc.gnu.org/ml/gcc-testresults/2011-04/msg00442.html ):

FAIL: obj-c++.dg/template-4.mm -fnext-runtime (internal compiler error)
FAIL: obj-c++.dg/template-4.mm -fnext-runtime (test for excess errors)
WARNING: obj-c++.dg/template-4.mm -fnext-runtime compilation failed to produce executable
FAIL: obj-c++.dg/strings/const-str-12.mm -fnext-runtime (internal compiler error)
FAIL: obj-c++.dg/strings/const-str-12.mm -fnext-runtime (test for excess errors)
...
FAIL: obj-c++.dg/torture/strings/string1.mm  -O2 -flto  -fnext-runtime (internal compiler error)
FAIL: obj-c++.dg/torture/strings/string1.mm  -O2 -flto  -fnext-runtime (test for excess errors)
WARNING: obj-c++.dg/torture/strings/string1.mm  -O2 -flto  -fnext-runtime compilation failed to produce executable

AFAICT they are all of the kind

/opt/gcc/work/gcc/testsuite/obj-c++.dg/template-4.mm: In function 'int main()':
/opt/gcc/work/gcc/testsuite/obj-c++.dg/template-4.mm:75:3: internal compiler error: tree check: expected tree that contains 'decl with RTL' structure, have 'const_decl' in cxx_mark_addressable, at cp/typeck.c:5378
Comment 1 Nathan Froyd 2011-04-06 13:39:29 UTC
Bleh, that would be my change.  I think what's required is making the CONST_DECL its own case there.
Comment 2 Nathan Froyd 2011-04-06 13:41:01 UTC
Created attachment 23900 [details]
untested patch
Comment 3 Iain Sandoe 2011-04-06 14:58:01 UTC
(In reply to comment #2)
> Created attachment 23900 [details]
> untested patch

seems to do the trick on i686-darwin9 ... 
.. linux is still bootstrapping..
Comment 4 Dominique d'Humieres 2011-04-06 15:58:42 UTC
> seems to do the trick on i686-darwin9 ...

On x86_64-apple-darwin10 too (incremental update with the patch in comment #2 on top of r172043 and regtesting of g++ and obj-c++ with -m32 and -m64).

Thanks for the quick fix.
Comment 5 Nathan Froyd 2011-04-14 18:46:48 UTC
Author: froydnj
Date: Thu Apr 14 18:46:34 2011
New Revision: 172441

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172441
Log:
	PR objc++/48479
	* typeck.c (cxx_mark_addressable) [CONST_DECL]: Mark addressable
	and return immediately.

Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck.c
Comment 6 Nathan Froyd 2011-04-14 18:48:23 UTC
Fixed.