https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77413
Bug ID: 77413 Summary: [7 regression] experimental/numeric/gcd.cc etc. FAIL Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: ro at gcc dot gnu.org CC: redi at gcc dot gnu.org Target Milestone: --- Host: *-*-solaris2.12 Target: *-*-solaris2.12 Build: *-*-solaris2.12 Between 20160826 (r239769) and 20610829 (r239817), two new testsuite regressions occured on Solaris 12 (haven't tried earlier OS versions yet): +FAIL: experimental/numeric/gcd.cc (test for excess errors) Excess errors: /vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/experimental/numeric/gcd.cc:24: error: non-constant condition for static assertion /vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/experimental/numeric/gcd.cc:24: in constexpr expansion of 'std::experimental::fundamentals_v2::lcm<int, int>(21, 6)' /var/gcc/regression/trunk/12-gcc/build/i386-pc-solaris2.12/libstdc++-v3/include/experimental/numeric:77: error: call to non-constexpr function 'int std::abs(int)' +FAIL: experimental/numeric/lcm.cc (test for excess errors) Excess errors: /vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/experimental/numeric/lcm.cc:24: error: non-constant condition for static assertion /vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/experimental/numeric/lcm.cc:24: in constexpr expansion of 'std::experimental::fundamentals_v2::gcd<int, int>(1071, 462)' /var/gcc/regression/trunk/12-gcc/build/i386-pc-solaris2.12/libstdc++-v3/include/experimental/numeric:65: in constexpr expansion of 'std::experimental::fundamentals_v2::gcd<int, int>(__n, (__m % __n))' /var/gcc/regression/trunk/12-gcc/build/i386-pc-solaris2.12/libstdc++-v3/include/experimental/numeric:65: in constexpr expansion of 'std::experimental::fundamentals_v2::gcd<int, int>(__n, (__m % __n))' /var/gcc/regression/trunk/12-gcc/build/i386-pc-solaris2.12/libstdc++-v3/include/experimental/numeric:65: in constexpr expansion of 'std::experimental::fundamentals_v2::gcd<int, int>(__n, (__m % __n))' /var/gcc/regression/trunk/12-gcc/build/i386-pc-solaris2.12/libstdc++-v3/include/experimental/numeric:64: error: call to non-constexpr function 'int std::abs(int)' /vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/experimental/numeric/lcm.cc:25: error: non-constant condition for static assertion /vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/experimental/numeric/lcm.cc:25: in constexpr expansion of 'std::experimental::fundamentals_v2::gcd<int, int>(2000, 20)' /var/gcc/regression/trunk/12-gcc/build/i386-pc-solaris2.12/libstdc++-v3/include/experimental/numeric:65: in constexpr expansion of 'std::experimental::fundamentals_v2::gcd<int, int>(__n, (__m % __n))' /var/gcc/regression/trunk/12-gcc/build/i386-pc-solaris2.12/libstdc++-v3/include/experimental/numeric:64: error: call to non-constexpr function 'int std::abs(int)' /vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/experimental/numeric/lcm.cc:26: error: non-constant condition for static assertion /vol/gcc/src/hg/trunk/local/libstdc++-v3/testsuite/experimental/numeric/lcm.cc:26: in constexpr expansion of 'std::experimental::fundamentals_v2::gcd<int, int>(2011, 17)' both 32 and 64-bit, both sparc and x86. I noticed that the earlier (successful) test was compiled without -include bits/stdc++.h, while the newer (failing) one is using that flag. Omitting it manually lets the tests PASS. I suspect this is from testsuite/lib/libstdc++.exp (libstdc++_init), but haven't checked yet. Rainer