Bug 88204 - New test case 26_numerics/complex/operators/more_constexpr.cc from r266416 fails
Summary: New test case 26_numerics/complex/operators/more_constexpr.cc from r266416 fails
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 9.0
: P3 normal
Target Milestone: ---
Assignee: Ed Smith-Rowland
URL:
Keywords:
Depends on: 19779 26374
Blocks:
  Show dependency treegraph
 
Reported: 2018-11-26 16:26 UTC by seurer
Modified: 2019-09-01 20:57 UTC (History)
5 users (show)

See Also:
Host: powerpc64*-*-*
Target: powerpc64*-*-*,powerpc-*-aix,powerpc*-*-darwin9
Build: powerpc64*-*-*
Known to work:
Known to fail:
Last reconfirmed: 2018-12-11 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description seurer 2018-11-26 16:26:00 UTC
I see this on all the powerpc64 targets I test on.


spawn -ignore SIGHUP /home/seurer/gcc/build/gcc-test2/./gcc/xg++ -shared-libgcc -B/home/seurer/gcc/build/gcc-test2/./gcc -nostdinc++ -L/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/libstdc++-v3/src -L/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/libstdc++-v3/src/.libs -L/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs -B/home/seurer/gcc/install/gcc-test2/powerpc64-unknown-linux-gnu/bin/ -B/home/seurer/gcc/install/gcc-test2/powerpc64-unknown-linux-gnu/lib/ -isystem /home/seurer/gcc/install/gcc-test2/powerpc64-unknown-linux-gnu/include -isystem /home/seurer/gcc/install/gcc-test2/powerpc64-unknown-linux-gnu/sys-include -B/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/./libstdc++-v3/src/.libs -fmessage-length=0 -fno-show-column -ffunction-sections -fdata-sections -g -O2 -D_GNU_SOURCE -DLOCALEDIR="." -nostdinc++ -I/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/libstdc++-v3/include/powerpc64-unknown-linux-gnu -I/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/libstdc++-v3/include -I/home/seurer/gcc/gcc-test2/libstdc++-v3/libsupc++ -I/home/seurer/gcc/gcc-test2/libstdc++-v3/include/backward -I/home/seurer/gcc/gcc-test2/libstdc++-v3/testsuite/util /home/seurer/gcc/gcc-test2/libstdc++-v3/testsuite/26_numerics/complex/operators/more_constexpr.cc -std=gnu++2a -fno-diagnostics-show-caret -fdiagnostics-color=never -S -o more_constexpr.s
/home/seurer/gcc/gcc-test2/libstdc++-v3/testsuite/26_numerics/complex/operators/more_constexpr.cc: In instantiation of 'void __gnu_test::test_operators() [with _Tp = long double]':
/home/seurer/gcc/gcc-test2/libstdc++-v3/testsuite/26_numerics/complex/operators/more_constexpr.cc:59:   required from here
/home/seurer/gcc/gcc-test2/libstdc++-v3/testsuite/26_numerics/complex/operators/more_constexpr.cc:41:   in 'constexpr' expansion of 'std::operator/<long double>(a, c)'
/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/libstdc++-v3/include/complex:429:   in 'constexpr' expansion of '#'result_decl' not supported by dump_expr#<expression error>.std::complex<long double>::operator/=(((long double)__y))'
/home/seurer/gcc/gcc-test2/libstdc++-v3/testsuite/26_numerics/complex/operators/more_constexpr.cc:41: error: '(1.0e+0l / 5.0e+0l)' is not a constant expression
compiler exited with status 1
FAIL: 26_numerics/complex/operators/more_constexpr.cc (test for excess errors)
Excess errors:
/home/seurer/gcc/gcc-test2/libstdc++-v3/testsuite/26_numerics/complex/operators/more_constexpr.cc:41:   in 'constexpr' expansion of 'std::operator/<long double>(a, c)'
/home/seurer/gcc/build/gcc-test2/powerpc64-unknown-linux-gnu/libstdc++-v3/include/complex:429:   in 'constexpr' expansion of '#'result_decl' not supported by dump_expr#<expression error>.std::complex<long double>::operator/=(((long double)__y))'
/home/seurer/gcc/gcc-test2/libstdc++-v3/testsuite/26_numerics/complex/operators/more_constexpr.cc:41: error: '(1.0e+0l / 5.0e+0l)' is not a constant expression
Comment 1 Iain Sandoe 2018-12-11 11:04:13 UTC
also on AIX and Darwin

this looks to be the long-standing problem of no constant folding for IBM long doubles on powerpc platforms that use them.
Comment 2 Jonathan Wakely 2019-01-09 09:38:08 UTC
Author: redi
Date: Wed Jan  9 09:37:34 2019
New Revision: 267757

URL: https://gcc.gnu.org/viewcvs?rev=267757&root=gcc&view=rev
Log:
PR libstdc++/88204 disable std::complex<long double> tests

The IBM128 long double format isn't foldable in constant expressions, so
conditionally skip the std::complex<long double> cases when they'll
fail.

	PR libstdc++/88204
	* testsuite/26_numerics/complex/operators/more_constexpr.cc: Do not
	test std::complex<long double> if long double format is IBM128.
	* testsuite/26_numerics/complex/requirements/more_constexpr.cc:
	Likewise.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/testsuite/26_numerics/complex/operators/more_constexpr.cc
    trunk/libstdc++-v3/testsuite/26_numerics/complex/requirements/more_constexpr.cc
Comment 3 Jonathan Wakely 2019-01-09 11:23:15 UTC
Fixed for GNU/Linux and AIX. Please reopen if it's still failing on Darwin.
Comment 4 Iain Sandoe 2019-09-01 20:57:36 UTC
also fixed on Darwin.