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

            Bug ID: 108672
           Summary: [13 Regression] g++.dg/modules/xtreme-header-2_a.H,
                    _b.C, _c.C
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hp at gcc dot gnu.org
  Target Milestone: ---
            Target: cris-elf, pru-elf

Tl;DR: not a dup of PR98531, but a bug in libstdc++-v3.  Also, a regression.

For cris-elf, these failures appeared with a commit in the range
r13-2740-gd812e8cb2a920f..r13-2748-g59f6dea963b5f7:
Build log:
Running /x/gcc/testsuite/g++.dg/modules/modules.exp ...
<...removing non-regression FAILs...>
FAIL: g++.dg/modules/xtreme-header-2_a.H -std=c++17 (test for excess errors)
FAIL: g++.dg/modules/xtreme-header-2_a.H module-cmi 
(gcm.cache/$srcdir/g++.dg/modules/xtreme-header-2_a.H.gcm)
FAIL: g++.dg/modules/xtreme-header-2_b.C -std=c++17 (test for excess errors)
FAIL: g++.dg/modules/xtreme-header-2_c.C -std=c++17 (test for excess errors)
FAIL: g++.dg/modules/xtreme-header-2_a.H -std=c++2a (test for excess errors)
FAIL: g++.dg/modules/xtreme-header-2_a.H module-cmi 
(gcm.cache/$srcdir/g++.dg/modules/xtreme-header-2_a.H.gcm)
FAIL: g++.dg/modules/xtreme-header-2_b.C -std=c++2a (test for excess errors)
FAIL: g++.dg/modules/xtreme-header-2_c.C -std=c++2a (test for excess errors)
FAIL: g++.dg/modules/xtreme-header-2_a.H -std=c++2b (test for excess errors)
FAIL: g++.dg/modules/xtreme-header-2_a.H module-cmi 
(gcm.cache/$srcdir/g++.dg/modules/xtreme-header-2_a.H.gcm)
FAIL: g++.dg/modules/xtreme-header-2_b.C -std=c++2b (test for excess errors)
FAIL: g++.dg/modules/xtreme-header-2_c.C -std=c++2b (test for excess errors)

They don't appear for {s390x, powerpc64, i686, x86_64, aarch64, arm}-linux-gnu.
They're there for pru-elf where the context looks the same as for cris-elf:
(https://gcc.gnu.org/pipermail/gcc-testresults/2023-January/775193.html).

The commit exposing the failure appears to be r13-2745-gc77f556741ded4, "c++:
xtreme-header modules tests cleanups", due to the '+#include <execution>'.

In g++.log for cris-elf, we can see that they all fail either fail
similarly as follows:

In file included from /x/gcc/libstdc++-v3/include/pstl/memory_impl.h:15,
                 from /x/gcc/libstdc++-v3/include/pstl/algorithm_impl.h:20,
                 from
/x/gccobj/cris-elf/libstdc++-v3/include/pstl/glue_execution_defs.h:50,
                 from /x/gccobj/cris-elf/libstdc++-v3/include/execution:34,
                 from /x/gcc/gcc/testsuite/g++.dg/modules/xtreme-header-2.h:4,
                 from
/x/gcc/gcc/testsuite/g++.dg/modules/xtreme-header-2_a.H:4:
/x/gcc/libstdc++-v3/include/pstl/unseq_backend_simd.h: In function 'bool
__pstl::__unseq_backend::__simd_or(_Index, _Di\
fferenceType, _Pred)':
/x/gcc/libstdc++-v3/include/pstl/unseq_backend_simd.h:77:9: error: 'int32_t'
was not declared in this scope
/x/gcc/libstdc++-v3/include/pstl/unseq_backend_simd.h:77:9: note: 'int32_t' is
defined in header '<cstdint>'; did you f\
orget to '#include <cstdint>'?
/x/gcc/libstdc++-v3/include/pstl/unseq_backend_simd.h:81:17: error: '__flag'
was not declared in this scope
/x/gcc/libstdc++-v3/include/pstl/unseq_backend_simd.h:82:14: error: '__flag'
was not declared in this scope
/x/gcc/gcc/testsuite/g++.dg/modules/xtreme-header-2_a.H: At global scope:
/x/gcc/gcc/testsuite/g++.dg/modules/xtreme-header-2_a.H: warning: not writing
module '/x/gcc/gcc/testsuite/g++.dg/modul\
es/xtreme-header-2_a.H' due to errors
compiler exited with status 1
FAIL: g++.dg/modules/xtreme-header-2_a.H -std=c++17 (test for excess errors)
Excess errors:
/x/gcc/libstdc++-v3/include/pstl/unseq_backend_simd.h:77:9: error: 'int32_t'
was not declared in this scope
/x/gcc/libstdc++-v3/include/pstl/unseq_backend_simd.h:81:17: error: '__flag'
was not declared in this scope
/x/gcc/libstdc++-v3/include/pstl/unseq_backend_simd.h:82:14: error: '__flag'
was not declared in this scope
/x/gcc/gcc/testsuite/g++.dg/modules/xtreme-header-2_a.H: warning: not writing
module '/x/gcc/gcc/testsuite/g++.dg/modul\
es/xtreme-header-2_a.H' due to errors
FAIL: g++.dg/modules/xtreme-header-2_a.H module-cmi 
(gcm.cache/$srcdir/g++.dg/modules/xtreme-header-2_a.H.gcm)

The error for cris-elf seems to be a "naked" use of int32_t; not having
a fitting #include: stdint.h or cstdint or inttypes.h or whatever, for
use in libstdc++-v3/include/pstl/unseq_backend_simd.h.  This is not
exposed on e.g. native x86_64-pc-linux-gnu, because there, it's included
as an effect of including stdlib.h in cstdlib (follow the trace in
xtreme-header-2_a.ii with glibc-2.31-13+deb11u5).  Will submit patch shortly.

Reply via email to