From patchwork Mon Nov 8 18:22:57 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 70441 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 856E7B7108 for ; Tue, 9 Nov 2010 05:23:33 +1100 (EST) Received: (qmail 18228 invoked by alias); 8 Nov 2010 18:23:31 -0000 Received: (qmail 18216 invoked by uid 22791); 8 Nov 2010 18:23:27 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 08 Nov 2010 18:23:19 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id DB6EE8CA; Mon, 8 Nov 2010 19:23:16 +0100 (CET) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id bksALUNm3sqp; Mon, 8 Nov 2010 19:23:09 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id D95E38C8; Mon, 8 Nov 2010 19:23:09 +0100 (CET) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id oA8IMvYJ004489; Mon, 8 Nov 2010 19:22:57 +0100 (MET) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: "Joseph S. Myers" Subject: [testsuite] Fix some more C and C++ testcases on Tru64 UNIX Date: Mon, 08 Nov 2010 19:22:57 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org This patch fixes a couple of testsuite failures on Tru64 UNIX: * g++.dg/abi/rtti3.C and g++.dg/abi/thunk4.C need to accomodate the fact that the Tru64 UNIX assembler uses .weakext, not .weak. * g++.dg/opt/combine.C requires visibility support without declaring it. * g++.dg/other/anon5.C fails to link: (anonymous namespace)::c::t collect2: ld returned 1 exit status so XFAIL it. * g++.dg/warn/miss-format-1.C needs to XFAIL the scanf attribute warning since Tru64 UNIX lacks vscanf just like Solaris 8 and Vxworks. * g++.dg/warn/pr31246.C fails like this: FAIL: g++.dg/warn/pr31246.C (test for excess errors) Excess errors: In file included from /var/gcc/regression/trunk/5.1b-gcc/build/alpha-dec-osf5.1b/libstdc++-v3/include/bits/stl_algobase.h:60:0, from /var/gcc/regression/trunk/5.1b-gcc/build/alpha-dec-osf5.1b/libstdc++-v3/include/vector:61, from /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/warn/pr31246.C:4: /var/gcc/regression/trunk/5.1b-gcc/build/alpha-dec-osf5.1b/libstdc++-v3/include/alpha-dec-osf5.1b/bits/c++config.h:235:4: warning: #warning currently using namespace associated mode which may fail without inlining due to lack of weak symbols [-Wcpp] I strongly suspect that this is due to the platform's lack of weak definitions (contrary to the `lack of weak symbols' text of the warning, which doesn't apply). I tried to use dg-warning for the message, but while this works, I'd still need to prune the location lines, which seems like too much hazzle. So I'm XFAILing the test. * g++.dg/warn/weak1.C and gcc.dg/attr-weakref-1.c require weak definitions, which Tru64 UNIX lacks, so skip them. * g++.old-deja/g++.eh/badalloc1.C needs an increased stack size, like several other platforms. There are a few more I don't yet know what to do about them: * one of the scan-assembler tests in g++.dg/other/unused1.C fail: FAIL: g++.dg/other/unused1.C scan-assembler (string|ascii?)z?[\t ]"printer("|\\\\0) The assembler output includes #.stabs "printer:Tt32=s4i:4,0,32;;",128,0,28,0 While I could match this, it seems easier to xfail the test. * gcc.dg/array-quals-1.c currently FAILs because the assembler output contains both .data and .rdata. I'll have to investigate why this happens. * gcc.dg/intmax_t-1.c currently fails like this: FAIL: gcc.dg/intmax_t-1.c (test for excess errors) Excess errors: /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/intmax_t-1.c:12:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/intmax_t-1.c:13:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/intmax_t-1.c:18:3: error: 'im_t_p' undeclared (first use in this function) /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/intmax_t-1.c:18:3: note: each undeclared identifier is reported only once for each function it appears in /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/intmax_t-1.c:24:3: error: 'uim_t_p' undeclared (first use in this function) The native lacks definitions of intmax_t and uintmax_t. One could fix this by replacing by . That file is now generated at build time and contains a definition of intmax_t. I'm not completely sure what the test is supposed to check in this situation, though. Joseph? The patch below was tested with the appropriate runtest invocations on alpha-dec-osf5.1b. Will commit within a day or two unless someone has better suggestions. Rainer 2010-11-06 Rainer Orth * g++.dg/abi/rtti3.C: Scan for .weakext on alpha*-dec-osf*. * g++.dg/abi/thunk4.C: Likewise. * g++.dg/opt/combine.C: Add dg-require-visibility. * g++.dg/other/anon5.C: Skip on alpha*-dec-osf*. * g++.dg/warn/miss-format-1.C: XFAIL scanf attribute warning on alpha*-dec-osf*. * g++.dg/warn/pr31246.C: XFAIL on alpha*-dec-osf*. * g++.dg/warn/weak1.C: Skip on alpha*-dec-osf*. * g++.old-deja/g++.eh/badalloc1.C [!STACK_SIZE && __osf__]: Use large arena_size. * gcc.dg/attr-weakref-1.c: Skip on alpha*-dec-osf*. diff -r f5914a010793 gcc/testsuite/g++.dg/abi/rtti3.C --- a/gcc/testsuite/g++.dg/abi/rtti3.C Mon Nov 08 17:14:13 2010 +0100 +++ b/gcc/testsuite/g++.dg/abi/rtti3.C Mon Nov 08 18:46:19 2010 +0100 @@ -3,10 +3,12 @@ // { dg-require-weak "" } // { dg-skip-if "Linkonce not weak" { *-*-mingw* *-*-cygwin } { "*" } { "" } } -// { dg-final { scan-assembler ".weak\[ \t\]_?_ZTSPP1A" { target { ! { *-*-darwin* } } } } } -// { dg-final { scan-assembler-not ".weak\[ \t\]_?_ZTIPP1A" { target { ! { *-*-darwin* } } } } } +// { dg-final { scan-assembler ".weak\[ \t\]_?_ZTSPP1A" { target { ! { *-*-darwin* alpha*-dec-osf* } } } } } +// { dg-final { scan-assembler-not ".weak\[ \t\]_?_ZTIPP1A" { target { ! { *-*-darwin* alpha*-dec-osf* } } } } } // { dg-final { scan-assembler ".weak_definition\[ \t\]_?_ZTSPP1A" { target { *-*-darwin* } } } } // { dg-final { scan-assembler-not ".weak_definition\[ \t\]_?_ZTIPP1A" { target { *-*-darwin* } } } } +// { dg-final { scan-assembler ".weakext\[ \t\]_?_ZTSPP1A" { target { alpha*-dec-osf* } } } } +// { dg-final { scan-assembler-not ".weakext\[ \t\]_?_ZTIPP1A" { target { alpha*-dec-osf* } } } } struct A; diff -r f5914a010793 gcc/testsuite/g++.dg/abi/thunk4.C --- a/gcc/testsuite/g++.dg/abi/thunk4.C Mon Nov 08 17:14:13 2010 +0100 +++ b/gcc/testsuite/g++.dg/abi/thunk4.C Mon Nov 08 18:46:19 2010 +0100 @@ -1,7 +1,8 @@ // { dg-require-weak "" } // { dg-skip-if "Linkonce not weak" { *-*-mingw* *-*-cygwin } { "*" } { "" } } -// { dg-final { scan-assembler ".weak\[ \t\]_?_ZThn._N7Derived3FooEv" { target { ! { *-*-darwin* } } } } } +// { dg-final { scan-assembler ".weak\[ \t\]_?_ZThn._N7Derived3FooEv" { target { ! { *-*-darwin* alpha*-dec-osf* } } } } } // { dg-final { scan-assembler ".weak_definition\[ \t\]_?_ZThn._N7Derived3FooEv" { target { *-*-darwin* } } } } +// { dg-final { scan-assembler ".weakext\[ \t\]_?_ZThn._N7Derived3FooEv" { target { alpha*-dec-osf* } } } } struct Base { diff -r f5914a010793 gcc/testsuite/g++.dg/opt/combine.C --- a/gcc/testsuite/g++.dg/opt/combine.C Mon Nov 08 17:14:13 2010 +0100 +++ b/gcc/testsuite/g++.dg/opt/combine.C Mon Nov 08 18:46:19 2010 +0100 @@ -1,5 +1,6 @@ // { dg-do assemble { target fpic } } // { dg-options "-O2 -fweb -fPIC -fvisibility=hidden" } +// { dg-require-visibility "" } class QBasicAtomicInt { diff -r f5914a010793 gcc/testsuite/g++.dg/other/anon5.C --- a/gcc/testsuite/g++.dg/other/anon5.C Mon Nov 08 17:14:13 2010 +0100 +++ b/gcc/testsuite/g++.dg/other/anon5.C Mon Nov 08 18:46:19 2010 +0100 @@ -1,5 +1,5 @@ // PR c++/34094 -// { dg-do link { target { ! { *-*-darwin* *-*-hpux* *-*-solaris2.* } } } } +// { dg-do link { target { ! { *-*-darwin* *-*-hpux* *-*-solaris2.* alpha*-dec-osf* } } } } // { dg-options "-g" } namespace { diff -r f5914a010793 gcc/testsuite/g++.dg/warn/miss-format-1.C --- a/gcc/testsuite/g++.dg/warn/miss-format-1.C Mon Nov 08 17:14:13 2010 +0100 +++ b/gcc/testsuite/g++.dg/warn/miss-format-1.C Mon Nov 08 18:46:19 2010 +0100 @@ -4,7 +4,7 @@ /* { dg-options "-Wmissing-format-attribute" } */ /* { dg-options "-Wmissing-format-attribute -Wno-abi" { target arm_eabi } } */ /* VxWorks does not provide vscanf, either in kernel or RTP mode. */ -/* { dg-error "not declared" "" { target { *-*-solaris2.8 *-*-vxworks* alpha*-dec-osf5* } } 26 } */ +/* { dg-error "not declared" "" { target { *-*-solaris2.8 *-*-vxworks* alpha*-dec-osf* } } 26 } */ #include #include @@ -23,7 +23,7 @@ { va_list ap; va_start (ap, fmt); - vscanf (fmt, ap); /* { dg-warning "candidate" "scanf attribute warning" { xfail *-*-solaris2.8 *-*-vxworks* } } */ + vscanf (fmt, ap); /* { dg-warning "candidate" "scanf attribute warning" { xfail *-*-solaris2.8 *-*-vxworks* alpha*-dec-osf* } } */ va_end (ap); } diff -r f5914a010793 gcc/testsuite/g++.dg/warn/pr31246.C --- a/gcc/testsuite/g++.dg/warn/pr31246.C Mon Nov 08 17:14:13 2010 +0100 +++ b/gcc/testsuite/g++.dg/warn/pr31246.C Mon Nov 08 18:46:19 2010 +0100 @@ -1,6 +1,7 @@ // PR 31246 // { dg-do compile } // { dg-options "-Wunreachable-code -D_GLIBCXX_DEBUG" } +// { dg-xfail-if "lack of weak symbols" { alpha*-dec-osf* } } #include int main() diff -r f5914a010793 gcc/testsuite/g++.dg/warn/weak1.C --- a/gcc/testsuite/g++.dg/warn/weak1.C Mon Nov 08 17:14:13 2010 +0100 +++ b/gcc/testsuite/g++.dg/warn/weak1.C Mon Nov 08 18:46:19 2010 +0100 @@ -1,7 +1,8 @@ // { dg-do run } // { dg-require-weak "" } -// The PA HP-UX dynamic loader doesn't support unsatisfied weak symbols. -// { dg-skip-if "No unsat" { hppa*-*-hpux* } { "*" } { "" } } +// The PA HP-UX and Tru64 UNIX dynamic loaders don't support unsatisfied +// weak symbols. +// { dg-skip-if "No unsat" { alpha*-dec-osf* hppa*-*-hpux* } { "*" } { "" } } // The darwin loader does, but they do need to exist at link time. // { dg-skip-if "No link unsat" { *-*-darwin* } { "*" } { "" } } // For kernel modules and static RTPs, the loader treats undefined weak diff -r f5914a010793 gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C --- a/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C Mon Nov 08 17:14:13 2010 +0100 +++ b/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C Mon Nov 08 18:46:19 2010 +0100 @@ -3,7 +3,7 @@ // itself call malloc(), and will fail if there is no more // memory available. // { dg-do run { xfail { { xstormy16-*-* *-*-darwin[3-7]* } || vxworks_rtp } } } -// Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc. +// Copyright (C) 2000, 2002, 2003, 2010 Free Software Foundation, Inc. // Contributed by Nathan Sidwell 6 June 2000 // Check we can throw a bad_alloc exception when malloc dies. @@ -18,8 +18,8 @@ #ifdef STACK_SIZE const int arena_size = 256; #else -#if defined(__FreeBSD__) || defined(__sun__) || defined(__hpux__) -// FreeBSD, Solaris and HP-UX with threads require even more +#if defined(__FreeBSD__) || defined(__sun__) || defined(__hpux__) || defined(__osf__) +// FreeBSD, Solaris, HP-UX and Tru64 UNIX with threads require even more // space at initialization time. FreeBSD 5 now requires over 131072 bytes. const int arena_size = 262144; #else diff -r f5914a010793 gcc/testsuite/gcc.dg/attr-weakref-1.c --- a/gcc/testsuite/gcc.dg/attr-weakref-1.c Mon Nov 08 17:14:13 2010 +0100 +++ b/gcc/testsuite/gcc.dg/attr-weakref-1.c Mon Nov 08 18:46:19 2010 +0100 @@ -2,9 +2,10 @@ // { dg-require-weak "" } // On darwin, we use attr-weakref-1-darwin.c. // This test requires support for undefined weak symbols. This support -// is not available on hppa*-*-hpux*. The test is skipped rather than -// xfailed to suppress the warning that would otherwise arise. -// { dg-skip-if "" { "*-*-darwin*" "hppa*-*-hpux*" } "*" { "" } } +// is not available on alpha*-dec-osf* and hppa*-*-hpux*. The test is +// skipped rather than xfailed to suppress the warning that would otherwise +// arise. +// { dg-skip-if "" { "alpha*-dec-osf*" "*-*-darwin*" "hppa*-*-hpux*" } "*" { "" } } // For kernel modules and static RTPs, the loader treats undefined weak // symbols in the same way as undefined strong symbols. The test // therefore fails to load, so skip it.