Hi Nathan, > The 82836 testcase fell out of creduce. In c++17 mode it fails horribly > with missing return errors. > > Applying this fix, so it's valid in c++17. It still ICEs (in both 14 and > 17 modes) with the 82836 fix removed.
unfortunately, the testcase has several more problems: * It fails on 32-bit Solaris/SPARC: Excess errors: /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/pr82836.C:12:3: error: expected unqualified-id before '__int128' /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/pr82836.C:13:3: error: '__float128' does not name a type; did you mean 'float'? /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/pr82836.C:158:31: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter [-fpermissive] /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/pr82836.C:159:33: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter [-fpermissive] /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/pr82836.C:285:37: error: template argument 1 is invalid /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/pr82836.C:288:46: error: template argument 1 is invalid * Likewise on 64-bit Solaris/SPARC: Excess errors: /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/pr82836.C:13:3: error: '__float128' does not name a type; did you mean 'float'? * And again on 32-bit x86 (both Solaris and Linux): Excess errors: /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/pr82836.C:12:3: error: expected unqualified-id before '__int128' /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/pr82836.C:158:31: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter [-fpermissive] /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/pr82836.C:159:33: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter [-fpermissive] /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/pr82836.C:285:37: error: template argument 1 is invalid /vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/pr82836.C:288:46: error: template argument 1 is invalid All of those are fixed as follows. Tested with the appropriate runtest invocations on i386-pc-solaris2.11, sparc-sun-solaris2.11, and x86_64-pc-linux-gnu. Ok for mainline, or would you rather make the use of __int128 and __float128 conditional? Thanks. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University 2017-11-19 Rainer Orth <r...@cebitec.uni-bielefeld.de> gcc/testsuite: * g++.dg/pr82836.C: Require int128, __float128 support. Add __float128 options. (size_t): Define using __SIZE_TYPE__.
# HG changeset patch # Parent a9e82327ce2d2f2e3fd4a800f29cf023cbc455e2 Add g++.dg/pr82836.C requirements diff --git a/gcc/testsuite/g++.dg/pr82836.C b/gcc/testsuite/g++.dg/pr82836.C --- a/gcc/testsuite/g++.dg/pr82836.C +++ b/gcc/testsuite/g++.dg/pr82836.C @@ -1,12 +1,15 @@ // PR c++/82836 // { dg-options "-std=c++17" } +// { dg-require-effective-target int128 } +// { dg-require-effective-target __float128 } // { dg-additional-options "-Wno-pedantic -Wno-return-type" } +// { dg-add-options __float128 } // We were resetting DECL_ASSEMBLER_NAME when processing pragma weak, // breaking C++'s mangling alias hash table. That hash table needs to // be tickled in just the right way to hit the problem. namespace std { -typedef long unsigned size_t; +typedef __SIZE_TYPE__ size_t; inline namespace __cxx11 {} double abs() {return 0;} __int128 abs(__int128 ) {return 0;}