public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/114568] New: [14 regression] g++.dg/vect/pr84556.cc fails to produce executable since r14-9706-gb8e7aaaf350a45
@ 2024-04-03  2:37 thiago.bauermann at linaro dot org
  2024-04-03  7:41 ` [Bug testsuite/114568] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: thiago.bauermann at linaro dot org @ 2024-04-03  2:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114568
           Summary: [14 regression] g++.dg/vect/pr84556.cc fails to
                    produce executable since r14-9706-gb8e7aaaf350a45
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: thiago.bauermann at linaro dot org
                CC: mkuvyrkov at gcc dot gnu.org
  Target Milestone: ---

After g:b8e7aaaf350a4584d9b76e8dd69daa2203bac339, r14-9706-gb8e7aaaf350a45 we
have noticed a regression on our "thumb_m3_eabi" and "thumb_m55_hard_eabi"
(more details about them later):


Running g++:g++.dg/vect/vect.exp ...
FAIL: g++.dg/vect/pr84556.cc -std=c++14 (test for excess errors)
UNRESOLVED: g++.dg/vect/pr84556.cc -std=c++14 compilation failed to produce
executable
FAIL: g++.dg/vect/pr84556.cc -std=c++17 (test for excess errors)
UNRESOLVED: g++.dg/vect/pr84556.cc -std=c++17 compilation failed to produce
executable
FAIL: g++.dg/vect/pr84556.cc -std=c++20 (test for excess errors)
UNRESOLVED: g++.dg/vect/pr84556.cc -std=c++20 compilation failed to produce
executable

commit b8e7aaaf350a4584d9b76e8dd69daa2203bac339
Author:     Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org>
CommitDate: Thu Mar 28 13:38:59 2024 +0000

    [testsuite] Fixup dg-options in {gcc,g++,gfortran}.dg/vect.exp tests

This is the part of g++.log showing the problem:

spawn -ignore SIGHUP
/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu/bin/arm-eabi-g++
/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/snapshots/gcc.git~master/gcc/testsuite/g++.dg/vect/pr84556.cc
-mthumb -march=armv8.1-m.main+mve.fp+fp.dp -mtune=cortex-m55 -mfloat-abi=hard
-mfpu=auto -fdiagnostics-plain-output -nostdinc++
-I/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/arm-eabi/gcc-gcc.git~master-stage2/arm-eabi/libstdc++-v3/include/arm-eabi
-I/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/arm-eabi/gcc-gcc.git~master-stage2/arm-eabi/libstdc++-v3/include
-I/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/snapshots/gcc.git~master/libstdc++-v3/libsupc++
-I/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/snapshots/gcc.git~master/libstdc++-v3/include/backward
-I/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/snapshots/gcc.git~master/libstdc++-v3/testsuite/util
-fmessage-length=0 -std=c++20 -O2 -ftree-vectorize -fno-vect-cost-model
-mfpu=neon -mfloat-abi=softfp -march=armv7-a -ffast-math
-fdump-tree-vect-details -O2 -fopenmp-simd -specs=rdimon.specs
-L/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/arm-eabi/gcc-gcc.git~master-stage2/arm-eabi/./libstdc++-v3/src/.libs
-B/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/arm-eabi/gcc-gcc.git~master-stage2/arm-eabi/./libstdc++-v3/src/.libs
-L/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/x86_64-pc-linux-gnu/arm-eabi/gcc-gcc.git~master-stage2/arm-eabi/./libstdc++-v3/src/experimental/.libs
-lm -o ./pr84556.exe
/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu/lib/gcc/arm-eabi/14.0.1/../../../../arm-eabi/bin/ld:
error: ./pr84556.exe uses VFP register arguments, /tmp/cce7HucW.o does not
/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu/lib/gcc/arm-eabi/14.0.1/../../../../arm-eabi/bin/ld:
error: /tmp/cce7HucW.o: conflicting architecture profiles A/M
/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu/lib/gcc/arm-eabi/14.0.1/../../../../arm-eabi/bin/ld:
failed to merge target specific data of file /tmp/cce7HucW.o
collect2: error: ld returned 1 exit status
compiler exited with status 1

I selected "testsuite" as the problematic component because the commit above
only made testsuite changes, but I'm not sure if this is a symptom of a problem
somewhere else.

In the "thumb_m3_eabi" configuration, GCC was configured with:

/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/snapshots/gcc.git~master/configure
\
    SHELL=/bin/bash \
   
--with-mpc=/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/destdir/x86_64-pc-linux-gnu
\
   
--with-mpfr=/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/destdir/x86_64-pc-linux-gnu
\
   
--with-gmp=/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/destdir/x86_64-pc-linux-gnu
\
    --with-gnu-as \
    --with-gnu-ld \
    --disable-libmudflap \
    --enable-lto \
    --enable-shared \
    --without-included-gettext \
    --enable-nls \
    --with-system-zlib \
    --disable-sjlj-exceptions \
    --enable-gnu-unique-object \
    --enable-linker-build-id \
    --disable-libstdcxx-pch \
    --enable-c99 \
    --enable-clocale=gnu \
    --enable-libstdcxx-debug \
    --enable-long-long \
    --with-cloog=no \
    --with-ppl=no \
    --with-isl=no \
    --enable-threads=no \
    --disable-multiarch \
    --disable-multilib \
    --with-mode=thumb \
    --with-cpu=cortex-m3 \
    --with-float=softfp \
   
--with-sysroot=/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/destdir/x86_64-pc-linux-gnu/arm-eabi
\
    --with-headers=yes \
    --with-native-system-header-dir=/include \
    --with-newlib \
    --enable-checking=yes \
    --disable-bootstrap \
    --enable-languages=c,c++,lto \
   
--prefix=/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/destdir/x86_64-pc-linux-gnu
\
    --build=x86_64-pc-linux-gnu \
    --host=x86_64-pc-linux-gnu \
    --target=arm-eabi

In the "thumb_m55_hard_eabi" configuration, GCC was configured with:

/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/snapshots/gcc.git~master/configure
\
    SHELL=/bin/bash \
   
--with-mpc=/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu
\
   
--with-mpfr=/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu
\
   
--with-gmp=/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu
\
    --with-gnu-as \
    --with-gnu-ld \
    --disable-libmudflap \
    --enable-lto \
    --enable-shared \
    --without-included-gettext \
    --enable-nls \
    --with-system-zlib \
    --disable-sjlj-exceptions \
    --enable-gnu-unique-object \
    --enable-linker-build-id \
    --disable-libstdcxx-pch \
    --enable-c99 \
    --enable-clocale=gnu \
    --enable-libstdcxx-debug \
    --enable-long-long \
    --with-cloog=no \
    --with-ppl=no \
    --with-isl=no \
    --enable-threads=no \
    --disable-multiarch \
    --disable-multilib \
    --with-mode=thumb \
    --with-arch=armv8.1-m.main+mve.fp+fp.dp \
    --with-float=hard \
   
--with-sysroot=/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu/arm-eabi
\
    --with-headers=yes \
    --with-native-system-header-dir=/include \
    --with-newlib \
    --enable-checking=yes \
    --disable-bootstrap \
    --enable-languages=c,c++,lto \
   
--prefix=/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu
\
    --build=x86_64-pc-linux-gnu \
    --host=x86_64-pc-linux-gnu \
    --target=arm-eabi

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug testsuite/114568] [14 regression] g++.dg/vect/pr84556.cc fails to produce executable since r14-9706-gb8e7aaaf350a45
  2024-04-03  2:37 [Bug testsuite/114568] New: [14 regression] g++.dg/vect/pr84556.cc fails to produce executable since r14-9706-gb8e7aaaf350a45 thiago.bauermann at linaro dot org
@ 2024-04-03  7:41 ` rguenth at gcc dot gnu.org
  2024-04-03  8:00 ` mkuvyrkov at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-04-03  7:41 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0
             Target|                            |arm

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug testsuite/114568] [14 regression] g++.dg/vect/pr84556.cc fails to produce executable since r14-9706-gb8e7aaaf350a45
  2024-04-03  2:37 [Bug testsuite/114568] New: [14 regression] g++.dg/vect/pr84556.cc fails to produce executable since r14-9706-gb8e7aaaf350a45 thiago.bauermann at linaro dot org
  2024-04-03  7:41 ` [Bug testsuite/114568] " rguenth at gcc dot gnu.org
@ 2024-04-03  8:00 ` mkuvyrkov at gcc dot gnu.org
  2024-04-03  8:04 ` clyon at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mkuvyrkov at gcc dot gnu.org @ 2024-04-03  8:00 UTC (permalink / raw)
  To: gcc-bugs

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

Maxim Kuvyrkov <mkuvyrkov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clyon at gcc dot gnu.org,
                   |                            |rearnsha at gcc dot gnu.org

--- Comment #1 from Maxim Kuvyrkov <mkuvyrkov at gcc dot gnu.org> ---
The test now fails with linker error:
.../arm-eabi/bin/ld: error: /tmp/cc2Q27GE.o: conflicting architecture profiles
A/M

This is due to command line having
-mthumb -march=armv7-m -mtune=cortex-m3 -mfloat-abi=softfp -mfpu=auto ...
-mfpu=neon -mfloat-abi=softfp -march=armv7-a

The first part comes from toolchain configuration settings, and the second part
(-mfpu=neon -mfloat-abi=softfp -march=armv7-a) comes from
check_effective_target_arm_neon_ok_nocache().

Surprisingly (to me), GCC accepts such mixed options, which makes
check_effective_target_arm_neon_ok_nocache() succeed, since it's only doing a
compilation test.  The linker, though, fails.

Richard E., it is expected that GCC accepts conflicting -march= options?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug testsuite/114568] [14 regression] g++.dg/vect/pr84556.cc fails to produce executable since r14-9706-gb8e7aaaf350a45
  2024-04-03  2:37 [Bug testsuite/114568] New: [14 regression] g++.dg/vect/pr84556.cc fails to produce executable since r14-9706-gb8e7aaaf350a45 thiago.bauermann at linaro dot org
  2024-04-03  7:41 ` [Bug testsuite/114568] " rguenth at gcc dot gnu.org
  2024-04-03  8:00 ` mkuvyrkov at gcc dot gnu.org
@ 2024-04-03  8:04 ` clyon at gcc dot gnu.org
  2024-04-03 10:04 ` mkuvyrkov at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: clyon at gcc dot gnu.org @ 2024-04-03  8:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Christophe Lyon <clyon at gcc dot gnu.org> ---
I think the last -march option overrides the previous one(s).

I'd say the test should use an effective-target which checks that linking is
actually OK rather than just a compile OK test. Not sure if an adequate one
already exists, but there are already plenty :-)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug testsuite/114568] [14 regression] g++.dg/vect/pr84556.cc fails to produce executable since r14-9706-gb8e7aaaf350a45
  2024-04-03  2:37 [Bug testsuite/114568] New: [14 regression] g++.dg/vect/pr84556.cc fails to produce executable since r14-9706-gb8e7aaaf350a45 thiago.bauermann at linaro dot org
                   ` (2 preceding siblings ...)
  2024-04-03  8:04 ` clyon at gcc dot gnu.org
@ 2024-04-03 10:04 ` mkuvyrkov at gcc dot gnu.org
  2024-04-03 10:12 ` clyon at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mkuvyrkov at gcc dot gnu.org @ 2024-04-03 10:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Maxim Kuvyrkov <mkuvyrkov at gcc dot gnu.org> ---
Changing from compile-only to link test is as simple as changing "object" to
"executable" in
[check_no_compiler_messages_nocache arm_neon_ok object ...]
.

However, ... this pattern of checking for ARM architectural features is shared
by 20+ check_effective_target_arm_* routines.  IMO, we should either update all
of these to be link tests (unless there is a good reason to keep them as
compile-only that we can document in the comments).  Or just accept this
vectorization test failure on ARM targets that don't support vectorization.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug testsuite/114568] [14 regression] g++.dg/vect/pr84556.cc fails to produce executable since r14-9706-gb8e7aaaf350a45
  2024-04-03  2:37 [Bug testsuite/114568] New: [14 regression] g++.dg/vect/pr84556.cc fails to produce executable since r14-9706-gb8e7aaaf350a45 thiago.bauermann at linaro dot org
                   ` (3 preceding siblings ...)
  2024-04-03 10:04 ` mkuvyrkov at gcc dot gnu.org
@ 2024-04-03 10:12 ` clyon at gcc dot gnu.org
  2024-04-03 12:53 ` mkuvyrkov at gcc dot gnu.org
  2024-05-07  7:45 ` [Bug testsuite/114568] [14/15 " rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: clyon at gcc dot gnu.org @ 2024-04-03 10:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Christophe Lyon <clyon at gcc dot gnu.org> ---
I'm wondering whether you missed check_effective_target_arm_arch_FUNC_link and
friends?

Maybe check_effective_target_arm_arch_v7a_neon_link would work here, but it
does not use the exact same flags.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug testsuite/114568] [14 regression] g++.dg/vect/pr84556.cc fails to produce executable since r14-9706-gb8e7aaaf350a45
  2024-04-03  2:37 [Bug testsuite/114568] New: [14 regression] g++.dg/vect/pr84556.cc fails to produce executable since r14-9706-gb8e7aaaf350a45 thiago.bauermann at linaro dot org
                   ` (4 preceding siblings ...)
  2024-04-03 10:12 ` clyon at gcc dot gnu.org
@ 2024-04-03 12:53 ` mkuvyrkov at gcc dot gnu.org
  2024-05-07  7:45 ` [Bug testsuite/114568] [14/15 " rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: mkuvyrkov at gcc dot gnu.org @ 2024-04-03 12:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Maxim Kuvyrkov <mkuvyrkov at gcc dot gnu.org> ---
Looking at this problem more, I think the issue is due to ARM target trying
hard to avoid UNSUPPORTED tests, instead of embracing them.

For the vectorization NEON check we have ...
===
proc check_effective_target_arm_neon_ok_nocache { } {
    global et_arm_neon_flags
    set et_arm_neon_flags ""
    if { [check_effective_target_arm32] } {
        foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon" "-mfpu=neon
-mfloat-abi=softfp" "-mfpu=neon -mfloat-abi=softfp -march=armv7-a"
"-mfloat-abi=hard" "-mfpu=neon -mfloat-abi=hard" "-mfpu=neon -mfloat-abi=hard
-march=armv7-a"} {
            if { [check_no_compiler_messages_nocache arm_neon_ok object {
                #include <arm_neon.h>
...
===
... where target tries to find a set of flags compatible with _any_ of the
built multilibs to run the testsuite.

I think this is excessive, since each multilib should be tested on its own
merits, and if armv7-m does not support vectorization, there should be no
effort to try and switch to armv7-a or armv8-m+mve multilib in order to run
vectorization tests.  In other words, vectorization tests should be marked
UNSUPPORTED in armv7-m, and PASS/FAIL in armv7-a and/or armv8-m+mve.

In practical terms, my proposed solution to this problem is to remove all
"foreach flags" options except for the default "".

ARM maintainers, what am I missing?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug testsuite/114568] [14/15 regression] g++.dg/vect/pr84556.cc fails to produce executable since r14-9706-gb8e7aaaf350a45
  2024-04-03  2:37 [Bug testsuite/114568] New: [14 regression] g++.dg/vect/pr84556.cc fails to produce executable since r14-9706-gb8e7aaaf350a45 thiago.bauermann at linaro dot org
                   ` (5 preceding siblings ...)
  2024-04-03 12:53 ` mkuvyrkov at gcc dot gnu.org
@ 2024-05-07  7:45 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-05-07  7:45 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|14.0                        |14.2

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 14.1 is being released, retargeting bugs to GCC 14.2.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-05-07  7:45 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-03  2:37 [Bug testsuite/114568] New: [14 regression] g++.dg/vect/pr84556.cc fails to produce executable since r14-9706-gb8e7aaaf350a45 thiago.bauermann at linaro dot org
2024-04-03  7:41 ` [Bug testsuite/114568] " rguenth at gcc dot gnu.org
2024-04-03  8:00 ` mkuvyrkov at gcc dot gnu.org
2024-04-03  8:04 ` clyon at gcc dot gnu.org
2024-04-03 10:04 ` mkuvyrkov at gcc dot gnu.org
2024-04-03 10:12 ` clyon at gcc dot gnu.org
2024-04-03 12:53 ` mkuvyrkov at gcc dot gnu.org
2024-05-07  7:45 ` [Bug testsuite/114568] [14/15 " rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).