https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104139

            Bug ID: 104139
           Summary: [12 Regression] g++.dg/abi/no_unique_address2.C at
                    r12-6028 (a37e8ce3b663)
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ABI
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hp at gcc dot gnu.org
                CC: jason at redhat dot com
  Target Milestone: ---

A patch in the commit range 93faac7e32e4..79a89108dd35, no doubt a37e8ce3b663,
caused g++.dg/abi/no_unique_address2.C to regress for cris-elf.
Judging from
https://gcc.gnu.org/pipermail/gcc-testresults/2022-January/744855.html it's
broken there too.  For cris-elf:

Running /X/gcc/testsuite/g++.dg/dg.exp ...
...
FAIL: g++.dg/abi/no_unique_address2.C  -std=c++14 (test for excess errors)
FAIL: g++.dg/abi/no_unique_address2.C  -std=c++17 (test for excess errors)
FAIL: g++.dg/abi/no_unique_address2.C  -std=c++2a (test for excess errors)

In g++.log:
spawn -ignore SIGHUP /X/obj/gcc/testsuite/g++/../../xg++
-B/X/obj/gcc/testsuite/g++/../../
/X/gccsrc/gcc/testsuite/g++.dg/abi/no_unique_address2.C
-fdiagnostics-plain-output -nostdinc++
-I/X/obj/cris-elf/libstdc++-v3/include/cris-elf
-I/X/obj/cris-elf/libstdc++-v3/include -I/X/gccsrc/libstdc++-v3/libsupc++
-I/X/gccsrc/libstdc++-v3/include/backward
-I/X/gccsrc/libstdc++-v3/testsuite/util -fmessage-length=0 -std=c++14
-pedantic-errors -Wno-long-long -S -isystem
/X/obj/cris-elf/./newlib/targ-include -isystem /X/gccsrc/newlib/libc/include -o
no_unique_address2.s
/X/gccsrc/gcc/testsuite/g++.dg/abi/no_unique_address2.C:43:17: error: static
assertion failed: sizeof (B3) == sizeof (B4)
/X/gccsrc/gcc/testsuite/g++.dg/abi/no_unique_address2.C:41:31: note: in
definition of macro 'SA'
compiler exited with status 1
FAIL: g++.dg/abi/no_unique_address2.C  -std=c++14 (test for excess errors)
Excess errors:
/X/gccsrc/gcc/testsuite/g++.dg/abi/no_unique_address2.C:43:17: error: static
assertion failed: sizeof (B3) == sizeof (B4)

Replacing the last two lines in the source file with
__SIZE_TYPE__ sizes[] = { sizeof (B2), sizeof (B3),  sizeof (B3), sizeof (B4)
};
shows that the sizes are:
        .dword  6
        .dword  6
        .dword  6
        .dword  5
With a build from before the failing commit range (specifically
r12-5824-g8e836af61b70) the sizes as all 6.

Reply via email to