Bug 93431 - FAIL: g++.dg/cpp2a/lambda-uneval9.C -std=c++2a (test for excess errors)
Summary: FAIL: g++.dg/cpp2a/lambda-uneval9.C -std=c++2a (test for excess errors)
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 10.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: c++-lambda, link-failure, testsuite-fail
Depends on:
Blocks: lambdas
  Show dependency treegraph
 
Reported: 2020-01-25 17:37 UTC by John David Anglin
Modified: 2023-11-15 18:56 UTC (History)
5 users (show)

See Also:
Host: hppa2.0w-hp-hpux11.11
Target: hppa2.0w-hp-hpux11.11 nvptx
Build: hppa2.0w-hp-hpux11.11
Known to work:
Known to fail:
Last reconfirmed: 2020-05-07 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2020-01-25 17:37:37 UTC
spawn /test/gnu/gcc/objdir/gcc/testsuite/g++/../../xg++ -B/test/gnu/gcc/objdir/gcc/testsuite/g++/../../ /test/gnu/gcc/gcc/gcc/testsuite/g++.dg/cpp2a/lambda-uneval9.C -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers -fdiagnostics-color=never -fdiagnostics-urls=never -nostdinc++ -I/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/include/hppa2.0w-hp-hpux11.11 -I/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/include -I/test/gnu/gcc/gcc/libstdc++-v3/libsupc++ -I/test/gnu/gcc/gcc/libstdc++-v3/include/backward -I/test/gnu/gcc/gcc/libstdc++-v3/testsuite/util -fmessage-length=0 -std=c++2a -pedantic-errors -Wno-long-long /test/gnu/gcc/gcc/gcc/testsuite/g++.dg/cpp2a/lambda-uneval9.cc -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libstdc++-v3/src/.libs -B/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libstdc++-v3/src/.libs -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libstdc++-v3/src/.libs -lm -o ./lambda-uneval9.exe
/usr/ccs/bin/ld: Duplicate symbol "_ZZ7counterIZ1fvEUlvE_EivE3cnt" in files /var/tmp//ccU6tw34.o and /var/tmp//ccQhHpab.o
/usr/ccs/bin/ld: Found 1 duplicate symbol(s)
collect2: error: ld returned 1 exit status
compiler exited with status 1
output is:
/usr/ccs/bin/ld: Duplicate symbol "_ZZ7counterIZ1fvEUlvE_EivE3cnt" in files /var/tmp//ccU6tw34.o and /var/tmp//ccQhHpab.o
/usr/ccs/bin/ld: Found 1 duplicate symbol(s)
collect2: error: ld returned 1 exit status

FAIL: g++.dg/cpp2a/lambda-uneval9.C  -std=c++2a (test for excess errors)
Excess errors:
/usr/ccs/bin/ld: Duplicate symbol "_ZZ7counterIZ1fvEUlvE_EivE3cnt" in files /var/tmp//ccU6tw34.o and /var/tmp//ccQhHpab.o
/usr/ccs/bin/ld: Found 1 duplicate symbol(s)

Setting LD_LIBRARY_PATH to .:/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libstdc++-v3/src/.libs:/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libstdc++-v3/src/.libs:/test/gnu/gcc/objdir/gcc:.:/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libstdc++-v3/src/.libs:/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libstdc++-v3/src/.libs:/test/gnu/gcc/objdir/gcc
FAIL: g++.dg/cpp2a/lambda-uneval9.C  -std=c++2a execution test
Comment 1 John David Anglin 2020-02-20 00:03:02 UTC
The following are unsupported:
UNSUPPORTED: g++.dg/cpp2a/lambda-uneval9.C  -std=c++98
UNSUPPORTED: g++.dg/cpp2a/lambda-uneval9.C  -std=c++14
UNSUPPORTED: g++.dg/cpp2a/lambda-uneval9.C  -std=c++17

Seems like on issue with check_effective_target_c++2a.
Comment 2 John David Anglin 2020-03-30 23:35:07 UTC
Does this test need -fcommon option?
Comment 3 Thomas Schwinge 2020-05-07 13:56:07 UTC
Supposedly same issue for nvptx target, where as of somewhere in cff5a231480526aa73094a22fe8b2f39b63735a4..c416c52bcdb120db5e8c53a51bd78c4360daf79b we got the regression:

    UNSUPPORTED: g++.dg/cpp2a/lambda-uneval9.C  -std=c++98
    UNSUPPORTED: g++.dg/cpp2a/lambda-uneval9.C  -std=c++14
    UNSUPPORTED: g++.dg/cpp2a/lambda-uneval9.C  -std=c++17
    PASS: g++.dg/cpp2a/lambda-uneval9.C  -std=c++2a (test for excess errors)
    [-PASS:-]{+FAIL:+} g++.dg/cpp2a/lambda-uneval9.C  -std=c++2a execution test

    spawn [...]/nvptx-none-run-single ./lambda-uneval9.exe
    error   : Multiple definition of '_ZZ7counterIZ1fvEUlvE_EivE3cnt' in 'input file 2 at offset 4789', first defined in 'input file 1 at offset 1796'
    nvptx-run: cuLinkAddData failed: unknown error (CUDA_ERROR_UNKNOWN, 999)
Comment 4 Thomas Schwinge 2023-11-15 18:56:42 UTC
(In reply to myself from comment #3)
> Supposedly same issue for nvptx target, [...]

I just noticed that the nvptx target instance of this happens to have been addressed by recent commit r14-5159-g9837f62f066db532c9db6df38ccf2653d0c3a960 "nvptx: Use the usual '#define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)'".