[gcc(refs/users/aoliva/heads/testbase)] testsuite: Fix up pr95548.C testcase.

Alexandre Oliva aoliva@gcc.gnu.org
Mon Jun 8 20:16:12 GMT 2020


https://gcc.gnu.org/g:296d644b9f526e44fbe574426f24799c1d545fd3

commit 296d644b9f526e44fbe574426f24799c1d545fd3
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Mon Jun 8 10:30:48 2020 +0200

    testsuite: Fix up pr95548.C testcase.
    
    2020-06-08  Jakub Jelinek  <jakub@redhat.com>
    
            PR lto/95548
            * g++.dg/torture/pr95548.C: Change from dg-do compile to dg-do link,
            add return type for main, for __SIZEOF_INT128__ test with __uint128_t
            enumerator constants and add a test with unsigned long long
            enumerators for all targets.

Diff:
---
 gcc/testsuite/g++.dg/torture/pr95548.C | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gcc/testsuite/g++.dg/torture/pr95548.C b/gcc/testsuite/g++.dg/torture/pr95548.C
index bca4f753f7e..cd758ebbde7 100644
--- a/gcc/testsuite/g++.dg/torture/pr95548.C
+++ b/gcc/testsuite/g++.dg/torture/pr95548.C
@@ -1,8 +1,10 @@
-/* { dg-do compile } */
-enum a { b = (unsigned long)-1 } c;
+/* { dg-do link } */
+enum A { A1 = (unsigned long)-1 } a;
+enum B { B1 = (unsigned long long)-1, B2 = 0x123456789abcdef0ULL } b;
 #ifdef __SIZEOF_INT128__
-enum c { d = (unsigned long)-1 } e;
+enum C { C1 = (__uint128_t)-1, C2 = ((__uint128_t) 0x123456789abcdef0ULL) << 64 | 0x0fedcba987654321ULL } c;
 #endif
-main()
+int
+main ()
 {
 }


More information about the Gcc-cvs mailing list