Bug 50296 - [4.7 Regression] New C++ test failures
Summary: [4.7 Regression] New C++ test failures
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: 4.7.0
Assignee: Jason Merrill
URL:
Keywords:
: 50311 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-09-05 16:32 UTC by H.J. Lu
Modified: 2011-09-06 19:48 UTC (History)
3 users (show)

See Also:
Host:
Target: i686-pc-linux-gnu, cris-elf, x86_64-*-*, power*-*-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2011-09-06 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2011-09-05 16:32:48 UTC
On Linux/x86, revision 178521 gave

FAIL: 20_util/tuple/moveable2.cc (test for excess errors)
FAIL: g++.dg/cpp0x/regress/abi-empty7.C (test for excess errors)

Revision 178517 is OK.
Comment 1 H.J. Lu 2011-09-05 19:06:27 UTC
It is caused by revision 178518:

http://gcc.gnu.org/ml/gcc-cvs/2011-09/msg00129.html
Comment 2 Hans-Peter Nilsson 2011-09-05 19:56:15 UTC
I see the
FAIL: 20_util/tuple/moveable2.cc (test for excess errors)
WARNING: 20_util/tuple/moveable2.cc compilation failed to produce executable
for cris-elf too, range 178513:178522 so I guess it's the same bug.
Comment 3 Richard Biener 2011-09-06 07:54:00 UTC
Confirmed, me too.
Comment 4 Dominique d'Humieres 2011-09-06 09:39:36 UTC
Me too on x86_64-apple-darwin10 and powerpc-apple-darwin9 (20_util/tuple/moveable2.cc only).
g++.dg/cpp0x/regress/abi-empty7.C fails with

FAIL: g++.dg/cpp0x/regress/abi-empty7.C (test for excess errors)
Excess errors:
/opt/gcc/work/gcc/testsuite/g++.dg/cpp0x/regress/abi-empty7.C:12:8: error: uninitialized member 'S7::s1' in 'constexpr' constructor
/opt/gcc/work/gcc/testsuite/g++.dg/cpp0x/regress/abi-empty7.C:7:8: error: uninitialized member 'S2::s1' in 'constexpr' constructor

and 20_util/tuple/moveable2.cc fails with

FAIL: 20_util/tuple/moveable2.cc (test for excess errors)
Excess errors:
/opt/gcc/build_w/x86_64-apple-darwin10.8.0/i386/libstdc++-v3/include/tuple:272:42: internal compiler error: Segmentation fault

Partial backtrace gives

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000000
cx_check_missing_mem_inits (fun=<value temporarily unavailable, due to optimizations>, body=0x1016db798, complain=false) at ../../work/gcc/cp/semantics.c:5808
5808		  if (TREE_CODE (field) != FIELD_DECL
(gdb) bt
#0  cx_check_missing_mem_inits (fun=<value temporarily unavailable, due to optimizations>, body=0x1016db798, complain=false) at ../../work/gcc/cp/semantics.c:5808
#1  0x00000001001a30cb in register_constexpr_fundef (fun=0x1016fb500, body=0x1016db798) at ../../work/gcc/cp/semantics.c:5853
Previous frame inner to this frame (gdb could not unwind past this frame)
Comment 5 Jason Merrill 2011-09-06 18:09:07 UTC
Author: jason
Date: Tue Sep  6 18:09:01 2011
New Revision: 178604

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178604
Log:
	PR c++/50296
	* semantics.c (register_constexpr_fundef): Call is_valid_constexpr_fn.
	(cx_check_missing_mem_inits): Handle bases and empty trivial members.
	(validate_constexpr_fundecl): Remove.
	* decl.c (start_preparsed_function): Don't call it.
	* cp-tree.h: Don't declare it.

Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/cp-tree.h
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-diag1.C
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-friend.C
Comment 6 Jason Merrill 2011-09-06 18:09:52 UTC
Should be fixed now.
Comment 7 Hans-Peter Nilsson 2011-09-06 19:48:09 UTC
*** Bug 50311 has been marked as a duplicate of this bug. ***