Bug 46303 - 'mutex' is not a member of 'std' failures in 30_threads/call_once/constexpr.cc, 30_threads/mutex/cons/constexpr.cc, 30_threads/once_flag/cons/constexpr.cc
Summary: 'mutex' is not a member of 'std' failures in 30_threads/call_once/constexpr.c...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: 4.6.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-04 13:21 UTC by Jack Howarth
Modified: 2010-11-05 12:02 UTC (History)
0 users

See Also:
Host: x86_64-apple-darwin10
Target: x86_64-apple-darwin10
Build: x86_64-apple-darwin10
Known to work:
Known to fail:
Last reconfirmed:


Attachments
compressed preprocessed source file for 30_threads/call_once/constexpr.cc at -m32 on x86_64-apple-darwin10 (133.56 KB, application/octet-stream)
2010-11-04 13:27 UTC, Jack Howarth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Howarth 2010-11-04 13:21:42 UTC
On x86_64-apple-darwin10 at r166279, the additional libstdc++ testsuite failures have appeared at -m32/-m64...

FAIL: 30_threads/call_once/constexpr.cc (test for excess errors)
FAIL: 30_threads/mutex/cons/constexpr.cc (test for excess errors)
FAIL: 30_threads/once_flag/cons/constexpr.cc (test for excess errors)

These are all of the form...

Executing on host: /sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/./gcc/g++ -shared-libgcc -B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/./gcc -nostdinc++ -L/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.5.0/i386/libstdc++-v3/src -L/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.5.0/i386/libstdc++-v3/src/.libs -B/sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/bin/ -B/sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/lib/ -isystem /sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/include -isystem /sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/sys-include -m32 -B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.5.0/i386/libstdc++-v3/src/.libs -g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0 -ffunction-sections -fdata-sections -g -O2 -g -O2 -DLOCALEDIR="." -nostdinc++ -I/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.5.0/i386/libstdc++-v3/include/x86_64-apple-darwin10.5.0 -I/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.5.0/i386/libstdc++-v3/include -I/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20101103/libstdc++-v3/libsupc++ -I/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20101103/libstdc++-v3/include/backward -I/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20101103/libstdc++-v3/testsuite/util /sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20101103/libstdc++-v3/testsuite/30_threads/call_once/constexpr.cc   -std=gnu++0x -S  -m32 -o constexpr.s    (timeout = 600)
/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20101103/libstdc++-v3/testsuite/30_threads/call_once/constexpr.cc: In function 'int main()':^M
/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20101103/libstdc++-v3/testsuite/30_threads/call_once/constexpr.cc:27:19: error: 'mutex' is not a member of 'std'^M
/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20101103/libstdc++-v3/testsuite/30_threads/call_once/constexpr.cc:27:19: error: 'mutex' is not a member of 'std'^M
/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20101103/libstdc++-v3/testsuite/30_threads/call_once/constexpr.cc:27:31: error: no matching function for call to '__gnu_test::constexpr_default_constructible::operator()()'^M
/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20101103/libstdc++-v3/testsuite/util/testsuite_common_types.h:620:18: note: candidate is: template<class _Tp> void __gnu_test::constexpr_default_constructible::operator()()^M
Comment 1 Jack Howarth 2010-11-04 13:27:27 UTC
Created attachment 22278 [details]
compressed preprocessed source file for 30_threads/call_once/constexpr.cc at -m32 on x86_64-apple-darwin10

Generated with...

/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/./gcc/g++ -shared-libgcc -B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/./gcc -nostdinc++ -L/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.5.0/i386/libstdc++-v3/src -L/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.5.0/i386/libstdc++-v3/src/.libs -B/sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/bin/ -B/sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/lib/ -isystem /sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/include -isystem /sw/lib/gcc4.6/x86_64-apple-darwin10.5.0/sys-include -m32 -B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.5.0/i386/libstdc++-v3/src/.libs -g -O2 -D_GLIBCXX_ASSERT -fmessage-length=0 -ffunction-sections -fdata-sections -g -O2 -g -O2 -DLOCALEDIR="." -nostdinc++ -I/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.5.0/i386/libstdc++-v3/include/x86_64-apple-darwin10.5.0 -I/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.5.0/i386/libstdc++-v3/include -I/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20101103/libstdc++-v3/libsupc++ -I/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20101103/libstdc++-v3/include/backward -I/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20101103/libstdc++-v3/testsuite/util /sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20101103/libstdc++-v3/testsuite/30_threads/call_once/constexpr.cc -std=gnu++0x -S -m32 --save-temps -o constexpr.s
Comment 2 Jack Howarth 2010-11-04 13:29:29 UTC
Regressions are not present at r166156.
Comment 3 Jonathan Wakely 2010-11-04 13:37:13 UTC
the preprocessed file shows this condition in <mutex> is false:

#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)

so those new tests need 

// { dg-require-cstdint "" }
// { dg-require-gthreads "" }

and probably other dg-options directives, similar to testsuite/30_threads/mutex/cons/1.cc
Comment 4 Jonathan Wakely 2010-11-04 13:38:54 UTC
Possibly:

// { dg-do compile { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cyg
win *-*-darwin* alpha*-*-osf* mips-sgi-irix6* } }
// { dg-options " -std=gnu++0x -pthread" { target *-*-freebsd* *-*-netbsd* *-*-l
inux* alpha*-*-osf* mips-sgi-irix6* } }
// { dg-options " -std=gnu++0x -pthreads" { target *-*-solaris* } }
// { dg-options " -std=gnu++0x " { target *-*-cygwin *-*-darwin* } }
// { dg-require-cstdint "" }
// { dg-require-gthreads "" }
Comment 5 Dominique d'Humieres 2010-11-04 13:47:44 UTC
Also seen on powerpc-apple-darwin9.8.0 between revisions 166170 and  166211 (see http://gcc.gnu.org/ml/gcc-testresults/2010-11/msg00098.html and http://gcc.gnu.org/ml/gcc-testresults/2010-11/msg00189.html ).
Comment 6 Paolo Carlini 2010-11-04 13:51:08 UTC
Those are dg-do compile testcases, thus adding on top:

// { dg-require-cstdint "" }
// { dg-require-gthreads "" }

consistently with the existing compile-only testcases should fix the spurious fails. If Jack can test the changes, I'll commit it later today.
Comment 7 paolo@gcc.gnu.org 2010-11-04 17:02:35 UTC
Author: paolo
Date: Thu Nov  4 17:02:25 2010
New Revision: 166319

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166319
Log:
2010-11-04  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/46303
	* testsuite/30_threads/call_once/constexpr.cc: Add missing dg-require
	directives.
	* testsuite/30_threads/mutex/cons/constexpr.cc: Likewise.
	* testsuite/30_threads/once_flag/cons/constexpr.cc: Likewise.

2010-11-04  Paolo Carlini  <paolo.carlini@oracle.com>

	* include/std/ratio (ratio_add, ratio_subtract, ratio_multiply,
	ratio_divide): Declare the data members constexpr.
	* testsuite/20_util/ratio/requirements/constexpr_data.cc: Extend.



Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/std/ratio
    trunk/libstdc++-v3/testsuite/20_util/ratio/requirements/constexpr_data.cc
    trunk/libstdc++-v3/testsuite/30_threads/call_once/constexpr.cc
    trunk/libstdc++-v3/testsuite/30_threads/mutex/cons/constexpr.cc
    trunk/libstdc++-v3/testsuite/30_threads/once_flag/cons/constexpr.cc
Comment 8 Paolo Carlini 2010-11-05 12:02:18 UTC
Should be fixed. Otherwise please re-open with updated details, thanks.