[Bug analyzer/111802] New analyser diagram failures since commit b365e9d57ad4

2024-02-15 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111802

--- Comment #2 from Thiago Jung Bauermann  
---
Thank you for responding.

Yes, I checked commit 5266f930bed0 ("Daily bump.") from yesterday and it's
still present.

[Bug analyzer/111802] [14 Regression] New analyser diagram failures since commit b365e9d57ad4

2024-03-01 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111802

--- Comment #5 from Thiago Jung Bauermann  
---
I can confirm this is fixed in our setup. Thank you!

[Bug target/99829] MVE: ICE in lra_assign at -O3

2024-03-12 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99829

Thiago Jung Bauermann  changed:

   What|Removed |Added

 CC||thiago.bauermann at linaro dot 
org

--- Comment #2 from Thiago Jung Bauermann  
---
We are still seeing this ICE in the Linaro CI:

spawn -ignore SIGHUP /path/to/install/bin/arm-eabi-g++
/path/to/gcc.git/gcc/testsuite/c-c++-common/torture/vshuf-v16qi.c -mthumb
-march=armv8.1-m.main+mve.fp+fp.dp -mtune=cortex-m55 -mfloat-abi=hard
-mfpu=auto -fdiagnostics-plain-output -nostdinc++
-I/path/to/builds/x86_64-pc-linux-gnu/arm-eabi/gcc-gcc.git~master-stage2/arm-eabi/libstdc++-v3/include/arm-eabi
-I/path/to/builds/x86_64-pc-linux-gnu/arm-eabi/gcc-gcc.git~master-stage2/arm-eabi/libstdc++-v3/include
-I/path/to/gcc.git/libstdc++-v3/libsupc++
-I/path/to/gcc.git/libstdc++-v3/include/backward
-I/path/to/gcc.git/libstdc++-v3/testsuite/util -fmessage-length=0 -O3 -g -S -o
vshuf-v16qi.s
during RTL pass: reload
In file included from
/path/to/gcc.git/gcc/testsuite/c-c++-common/torture/vshuf-v16qi.c:5:
/path/to/gcc.git/gcc/testsuite/c-c++-common/torture/vshuf-main.inc: In function
'int main()':
/path/to/gcc.git/gcc/testsuite/c-c++-common/torture/vshuf-main.inc:26:1:
internal compiler error: in lra_assign, at lra-assigns.cc:1657
0x10c07d1 lra_assign(bool&)
../../../../../../gcc/gcc/lra-assigns.cc:1657
0x10ba784 lra(_IO_FILE*, int)
../../../../../../gcc/gcc/lra.cc:2493
0x106fa8f do_reload
../../../../../../gcc/gcc/ira.cc:5973
0x106fa8f execute
../../../../../../gcc/gcc/ira.cc:6161
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
compiler exited with status 1

This is with trunk from March 8, commit cebbaa2a8458 ("[PR113790][LRA]: Fixing
LRA ICE on riscv64")

The same problem also happens in other related tests:

FAIL: c-c++-common/torture/vshuf-v2di.c -O3 -g  (internal compiler error: in
lra_assign, at lra-assigns.cc:1657)
FAIL: c-c++-common/torture/vshuf-v4sf.c -O3 -g  (internal compiler error: in
lra_assign, at lra-assigns.cc:1657)
FAIL: c-c++-common/torture/vshuf-v4si.c -O3 -g  (internal compiler error: in
lra_assign, at lra-assigns.cc:1657)
FAIL: c-c++-common/torture/vshuf-v8hi.c -O3 -g  (internal compiler error: in
lra_assign, at lra-assigns.cc:1657)

GCC is configured with:

/path/to/gcc.git/configure \
SHELL=/bin/bash \
--with-mpc=/path/to/install \
--with-mpfr=/path/to/install \
--with-gmp=/path/to/install \
--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=/path/to/install/arm-eabi \
--with-headers=yes \
--with-native-system-header-dir=/include \
--with-newlib \
--enable-checking=yes \
--disable-bootstrap \
--enable-languages=c,c++,lto \
--prefix=/path/to/install \
--build=x86_64-pc-linux-gnu \
--host=x86_64-pc-linux-gnu \
--target=arm-eabi

[Bug target/99829] MVE: ICE in lra_assign at -O3

2024-03-12 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99829

--- Comment #6 from Thiago Jung Bauermann  
---
Created attachment 57683
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57683&action=edit
Preprocessed source file.

I was able to reproduce the ICE on my x86_64 laptop with the following
commands. There's no timeout problem involved.
I'm attaching the Preprocessed source file.

$ mkdir -p ~/.cache/builds/combined-tree-src
$ mkdir -p ~/.cache/builds/combined-tree-arm-eabi
$ cd ~/src/newlib-cygwin && find . -print | cpio -pdlm
~/.cache/builds/combined-tree-src
$ cd ~/src/binutils-gdb && find . -print | cpio -pdlmu
~/.cache/builds/combined-tree-src
$ cd ~/src/gcc && find . -print | cpio -pdlmu ~/.cache/builds/combined-tree-src
$ cd ~/.cache/builds/combined-tree-arm-eabi
$ ../combined-tree-src/configure \
SHELL=/bin/bash \
--with-gnu-as \
--with-gnu-ld \
--disable-libmudflap \
--disable-gdb \
--disable-gprof \
--disable-gprofng \
--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=/tmp/install/arm-eabi \
--with-headers=yes \
--with-native-system-header-dir=/include \
--with-newlib \
--enable-checking=yes \
--disable-bootstrap \
--enable-languages=c,c++,lto \
--prefix=/tmp/install \
--build=x86_64-pc-linux-gnu \
--host=x86_64-pc-linux-gnu \
--target=arm-eabi
$ make \
SHELL=/bin/bash \
-w \
-j 8 \
LDFLAGS_FOR_TARGET=" --specs=rdimon.specs" \
CFLAGS_FOR_BUILD="-pipe -g -O2" \
CXXFLAGS_FOR_BUILD="-pipe -g -O2" \
LDFLAGS_FOR_BUILD="-static-libgcc" \
MAKEINFOFLAGS=--force
$
/home/bauermann/.cache/builds/combined-tree-arm-eabi/gcc/testsuite/g++/../../xg++
\
   
-B/home/bauermann/.cache/builds/combined-tree-arm-eabi/gcc/testsuite/g++/../../
\
   
/home/bauermann/.cache/builds/combined-tree-src/gcc/testsuite/c-c++-common/torture/vshuf-v16qi.c
\
-fdiagnostics-plain-output \
-nostdinc++ \
   
-I/home/bauermann/.cache/builds/combined-tree-arm-eabi/arm-eabi/libstdc++-v3/include/arm-eabi
\
   
-I/home/bauermann/.cache/builds/combined-tree-arm-eabi/arm-eabi/libstdc++-v3/include
\
-I/home/bauermann/.cache/builds/combined-tree-src/libstdc++-v3/libsupc++ \
   
-I/home/bauermann/.cache/builds/combined-tree-src/libstdc++-v3/include/backward
\
   
-I/home/bauermann/.cache/builds/combined-tree-src/libstdc++-v3/testsuite/util \
-fmessage-length=0 \
-O3 \
-g \
-S \
-o vshuf-v16qi.s
during RTL pass: reload
In file included from
/home/bauermann/.cache/builds/combined-tree-src/gcc/testsuite/c-c++-common/torture/vshuf-v16qi.c:5:
/home/bauermann/.cache/builds/combined-tree-src/gcc/testsuite/c-c++-common/torture/vshuf-main.inc:
In function ‘int main()’:
/home/bauermann/.cache/builds/combined-tree-src/gcc/testsuite/c-c++-common/torture/vshuf-main.inc:26:1:
internal compiler error: in lra_assign, at lra-assigns.cc:1657
0x10b2b19 lra_assign(bool&)
../../combined-tree-src/gcc/lra-assigns.cc:1657
0x10acf3f lra(_IO_FILE*, int)
../../combined-tree-src/gcc/lra.cc:2493
0x10617ef do_reload
../../combined-tree-src/gcc/ira.cc:5973
0x10617ef execute
../../combined-tree-src/gcc/ira.cc:6161
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug target/99829] MVE: ICE in lra_assign at -O3

2024-03-28 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99829

--- Comment #9 from Thiago Jung Bauermann  
---
Hello Vladimir,

Sorry for the delay in getting back to this.

(In reply to GCC Commits from comment #8)
> The master branch has been updated by Vladimir Makarov
> :
> 
> https://gcc.gnu.org/g:9c91f8a88b2db50c8faf70786d3cef27b39ac9fc
> 
> commit r14-9557-g9c91f8a88b2db50c8faf70786d3cef27b39ac9fc
> Author: Vladimir N. Makarov 
> Date:   Tue Mar 19 16:57:11 2024 -0400
> 
> [PR99829][LRA]: Fixing LRA ICE on arm

I can confirm that the commit fixes this bug. Thank you!

[Bug testsuite/114568] New: [14 regression] g++.dg/vect/pr84556.cc fails to produce executable since r14-9706-gb8e7aaaf350a45

2024-04-02 Thread thiago.bauermann at linaro dot org via 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 
CommitDate: Thu Mar 28 13:38:59 2024 +

[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 \
--wi

[Bug tree-optimization/110742] [14 Regression] cc1plus ICE "Floating point exception" during SLP and profiled bootstrap

2023-07-19 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110742

--- Comment #10 from Thiago Jung Bauermann  
---
Thank you very much for digging into this!

[Bug preprocessor/103902] GCC requires a space between string-literal and identifier in a literal-operator-id where the identifier is not in basic character set

2023-07-19 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103902

Thiago Jung Bauermann  changed:

   What|Removed |Added

 CC||thiago.bauermann at linaro dot 
org

--- Comment #8 from Thiago Jung Bauermann  
---
Hello,

The new tests udlit-extended-id-1.C and udlit-extended-id-3.C are failing on
armv8l-linux-gnueabihf (tested on Ubuntu 22.04):

Running g++:g++.dg/dg.exp ...
FAIL: g++.dg/cpp0x/udlit-extended-id-1.C -std=c++14 (test for excess errors)
UNRESOLVED: g++.dg/cpp0x/udlit-extended-id-1.C -std=c++14 compilation failed to
produce executable
FAIL: g++.dg/cpp0x/udlit-extended-id-1.C -std=c++17 (test for excess errors)
UNRESOLVED: g++.dg/cpp0x/udlit-extended-id-1.C -std=c++17 compilation failed to
produce executable
FAIL: g++.dg/cpp0x/udlit-extended-id-1.C -std=c++20 (test for excess errors)
UNRESOLVED: g++.dg/cpp0x/udlit-extended-id-1.C -std=c++20 compilation failed to
produce executable
FAIL: g++.dg/cpp0x/udlit-extended-id-3.C -std=c++14 (test for excess errors)
FAIL: g++.dg/cpp0x/udlit-extended-id-3.C -std=c++17 (test for excess errors)
FAIL: g++.dg/cpp0x/udlit-extended-id-3.C -std=c++20 (test for excess errors)

Looking at g++.log, the errors are:

/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/cpp0x/udlit-extended-id-1.C:24:14:
error: 'const char* operator""_1\U03c3(const char*, long unsigned int)' has
invalid argument list
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/cpp0x/udlit-extended-id-1.C:29:14:
error: 'const char* operator""_\U03a32(const char*, long unsigned int)' has
invalid argument list
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/cpp0x/udlit-extended-id-1.C:34:14:
error: 'const char* operator""_\U00e61(const char*, long unsigned int)' has
invalid argument list
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/cpp0x/udlit-extended-id-1.C:39:13:
error: 'const char* operator""_\U01532(const char*, long unsigned int)' has
invalid argument list
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/cpp0x/udlit-extended-id-1.C:
In function 'int main()':
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/cpp0x/udlit-extended-id-1.C:56:15:
error: unable to find string literal operator 'operator""_1\U03c3' with
'const char [4]', 'unsigned int' arguments
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/cpp0x/udlit-extended-id-1.C:58:15:
error: unable to find string literal operator 'operator""_\U03a32' with
'const char [5]', 'unsigned int' arguments
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/cpp0x/udlit-extended-id-1.C:60:15:
error: unable to find string literal operator 'operator""_1\U03c3' with
'const char [7]', 'unsigned int' arguments
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/cpp0x/udlit-extended-id-1.C:62:15:
error: unable to find string literal operator 'operator""_1\U03c3' with
'const char [8]', 'unsigned int' arguments
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/cpp0x/udlit-extended-id-1.C:65:15:
error: unable to find string literal operator 'operator""_\U03a32' with
'const char [7]', 'unsigned int' arguments
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/cpp0x/udlit-extended-id-1.C:67:15:
error: unable to find string literal operator 'operator""_\U00e61' with
'const char [4]', 'unsigned int' arguments
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/cpp0x/udlit-extended-id-1.C:69:15:
error: unable to find string literal operator 'operator""_\U01532' with
'const char [4]', 'unsigned int' arguments
compiler exited with status 1

Any idea what could be going wrong? They do pass on aarch64-linux, so I wonder
if this is a 32-bit issue?

[Bug preprocessor/103902] GCC requires a space between string-literal and identifier in a literal-operator-id where the identifier is not in basic character set

2023-07-19 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103902

--- Comment #10 from Thiago Jung Bauermann  
---
(In reply to Lewis Hyatt from comment #9)
> Thanks, sorry about that, I need to replace "unsigned long" with "size_t".
> Will fix it.

No problem. Thank you!

[Bug preprocessor/103902] GCC requires a space between string-literal and identifier in a literal-operator-id where the identifier is not in basic character set

2023-07-20 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103902

--- Comment #12 from Thiago Jung Bauermann  
---
I confirmed that this fixed the failures I was seeing. Thanks again!

[Bug c++/110756] New: [14 Regression] commit g:92d1425ca78 causes failures in g++.dg/gomp/pr58567.C

2023-07-20 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110756

Bug ID: 110756
   Summary: [14 Regression] commit g:92d1425ca78 causes failures
in g++.dg/gomp/pr58567.C
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thiago.bauermann at linaro dot org
CC: ppalka at gcc dot gnu.org
  Target Milestone: ---

Our CI detected that commit g:92d1425ca780 "c++: redundant targ coercion for
var/alias tmpls" caused these testsuite failures:

Running g++:g++.dg/gomp/gomp.exp ...
FAIL: g++.dg/gomp/pr58567.C -std=c++14 (test for excess errors)
FAIL: g++.dg/gomp/pr58567.C -std=c++17 (test for excess errors)
FAIL: g++.dg/gomp/pr58567.C -std=c++20 (test for excess errors)
FAIL: g++.dg/gomp/pr58567.C -std=c++98 (test for excess errors)

I confirmed that the problem is still present in trunk as of commit
g:b50a851eef4b "i386: Double-word sign-extension missed-optimization
[PR110717]" from today.

I also confirmed that reverting the mentioned commit from trunk fixes the test
failures. Reproduced the problem on Ubuntu 22.04, on both aarch64-linux and
x86_64-linux.

The relevant part of g++.log is:

Executing on host:
/home/thiago.bauermann/.cache/builds/gcc-native/gcc/testsuite/g++/../../xg++
-B/home/thiago.bauermann/.cache/builds/gcc-native/gcc/testsuite/g++/../../
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C   
-fdiagnostics-plain-output  -nostdinc++
-I/home/thiago.bauermann/.cache/builds/gcc-native/aarch64-unknown-linux-gnu/libstdc++-v3/include/aarch64-unknown-linux-gnu
-I/home/thiago.bauermann/.cache/builds/gcc-native/aarch64-unknown-linux-gnu/libstdc++-v3/include
-I/home/thiago.bauermann/src/gcc/libstdc++-v3/libsupc++
-I/home/thiago.bauermann/src/gcc/libstdc++-v3/include/backward
-I/home/thiago.bauermann/src/gcc/libstdc++-v3/testsuite/util -fmessage-length=0
 -std=c++20 -fopenmp  -S -o pr58567.s(timeout = 300)
spawn -ignore SIGHUP
/home/thiago.bauermann/.cache/builds/gcc-native/gcc/testsuite/g++/../../xg++
-B/home/thiago.bauermann/.cache/builds/gcc-native/gcc/testsuite/g++/../../
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C
-fdiagnostics-plain-output -nostdinc++
-I/home/thiago.bauermann/.cache/builds/gcc-native/aarch64-unknown-linux-gnu/libstdc++-v3/include/aarch64-unknown-linux-gnu
-I/home/thiago.bauermann/.cache/builds/gcc-native/aarch64-unknown-linux-gnu/libstdc++-v3/include
-I/home/thiago.bauermann/src/gcc/libstdc++-v3/libsupc++
-I/home/thiago.bauermann/src/gcc/libstdc++-v3/include/backward
-I/home/thiago.bauermann/src/gcc/libstdc++-v3/testsuite/util -fmessage-length=0
-std=c++20 -fopenmp -S -o pr58567.s
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C: In
instantiation of 'void foo() [with T = int]':
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C:14:11:  
required from here
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C:8:22: error:
'int' is not a class, struct, or union type
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C:8:3: error:
invalid type for iteration variable 'i'
compiler exited with status 1
PASS: g++.dg/gomp/pr58567.C  -std=c++20  (test for errors, line 8)
FAIL: g++.dg/gomp/pr58567.C  -std=c++20 (test for excess errors)
Excess errors:
/home/thiago.bauermann/src/gcc/gcc/testsuite/g++.dg/gomp/pr58567.C:8:3: error:
invalid type for iteration variable 'i'


Tested with:

$ ~/src/gcc/configure \
--disable-bootstrap \
--disable-multilib \
&& make -j 8 \
&& make -C gcc check-c++ RUNTESTFLAGS=g++.dg/gomp/gomp.exp

[Bug testsuite/110756] [14 Regression] commit g:92d1425ca78 causes failures in g++.dg/gomp/pr58567.C

2023-07-20 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110756

--- Comment #2 from Thiago Jung Bauermann  
---
Ah! Thanks for the analysis. Should I submit the following patch to the mailing
list then?

diff --git a/gcc/testsuite/g++.dg/gomp/pr58567.C
b/gcc/testsuite/g++.dg/gomp/pr58567.C
index 35a5bb027ffe..866d831c65e4 100644
--- a/gcc/testsuite/g++.dg/gomp/pr58567.C
+++ b/gcc/testsuite/g++.dg/gomp/pr58567.C
@@ -5,7 +5,7 @@
 template void foo()
 {
   #pragma omp parallel for
-  for (typename T::X i = 0; i < 100; ++i)  /* { dg-error "'int' is not a
class, struct, or union type|expected iteration declaration or initialization"
} */
+  for (typename T::X i = 0; i < 100; ++i)  /* { dg-error "'int' is not a
class, struct, or union type|invalid type for iteration variable 'i'" } */
 ;
 }

[Bug tree-optimization/110742] [14 Regression] cc1plus ICE "Floating point exception" during SLP and profiled bootstrap

2023-07-21 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110742

--- Comment #15 from Thiago Jung Bauermann  
---
Thanks! I confirmed that I can't reproduce the problem anymore in trunk.

[Bug target/110727] [14 Regression] gcc.target/aarch64/sve/aarch64-sve.exp has two new failures since commit 061f74c0673

2023-07-21 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110727

--- Comment #2 from Thiago Jung Bauermann  
---
Thanks! I confirmed that I can't reproduce the problem anymore in trunk.

[Bug middle-end/110796] New: builtin_iseqsig fails some tests in armv8l-linux-gnueabihf

2023-07-24 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110796

Bug ID: 110796
   Summary: builtin_iseqsig fails some tests in
armv8l-linux-gnueabihf
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thiago.bauermann at linaro dot org
CC: fxcoudert at gcc dot gnu.org
  Target Milestone: ---
Target: armv8l-unknown-linux-gnueabihf

Commit 34cf27a64e7a "Add __builtin_iseqsig()" introduced the mentioned builtin
along with some new tests. Unfortunately they have some failures in
armv8l-linux-gnueabihf:

Running gcc:gcc.dg/torture/dg-torture.exp ...
FAIL: gcc.dg/torture/builtin-iseqsig-1.c -Os  execution test
FAIL: gcc.dg/torture/builtin-iseqsig-2.c -Os  execution test
FAIL: gcc.dg/torture/builtin-iseqsig-3.c -Os  execution test

gcc.log doesn't have any hint on what actually went wrong. E.g.:

Executing on host:
/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/gcc/xgcc
-B/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/gcc/
/home/thiago.bauermann/src/gcc/gcc/testsuite/gcc.dg/torture/builtin-iseqsig-1.c
   -fdiagnostics-plain-output-Os  -fsignaling-nans  -lm  -o
./builtin-iseqsig-1.exe(timeout = 300)
spawn -ignore SIGHUP
/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/gcc/xgcc
-B/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/gcc/
/home/thiago.bauermann/src/gcc/gcc/testsuite/gcc.dg/torture/builtin-iseqsig-1.c
-fdiagnostics-plain-output -Os -fsignaling-nans -lm -o ./builtin-iseqsig-1.exe
PASS: gcc.dg/torture/builtin-iseqsig-1.c   -Os  (test for excess errors)
Setting LD_LIBRARY_PATH to
:/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/gcc::/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/gcc
Execution timeout is: 300
spawn [open ...]
FAIL: gcc.dg/torture/builtin-iseqsig-1.c   -Os  execution test

The problem is still present in trunk as of commit 2a3556376c69 "match.pd:
Implement missed optimization (~X | Y) ^ X -> ~(X & Y) [PR109986]" from today.

Reproduced on Ubuntu 22.04 with:

$ ~/src/gcc/configure \
  --disable-bootstrap \
  --disable-multilib \
  --with-mode=thumb \
  --with-arch=armv8-a \
  --with-float=hard \
  --with-fpu=neon-fp-armv8 \
  && make -j 60 \
  && make -C gcc check-c RUNTESTFLAGS=gcc.dg/torture/dg-torture.exp

[Bug target/110796] builtin_iseqsig fails some tests in armv8l-linux-gnueabihf

2023-07-24 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110796

--- Comment #2 from Thiago Jung Bauermann  
---
Thanks for the quick response!

(In reply to Andrew Pinski from comment #1)
> Does pr91323.c fail on arm?

No, all its tests pass:

PASS: gcc.dg/torture/pr91323.c   -O0  (test for excess errors)
PASS: gcc.dg/torture/pr91323.c   -O0  execution test
PASS: gcc.dg/torture/pr91323.c   -O1  (test for excess errors)
PASS: gcc.dg/torture/pr91323.c   -O1  execution test
PASS: gcc.dg/torture/pr91323.c   -O2  (test for excess errors)
PASS: gcc.dg/torture/pr91323.c   -O2  execution test
PASS: gcc.dg/torture/pr91323.c   -O3 -g  (test for excess errors)
PASS: gcc.dg/torture/pr91323.c   -O3 -g  execution test
PASS: gcc.dg/torture/pr91323.c   -Os  (test for excess errors)
PASS: gcc.dg/torture/pr91323.c   -Os  execution test
PASS: gcc.dg/torture/pr91323.c   -O2 -flto -fno-use-linker-plugin
-flto-partition=none  (test for excess errors)
PASS: gcc.dg/torture/pr91323.c   -O2 -flto -fno-use-linker-plugin
-flto-partition=none  execution test
PASS: gcc.dg/torture/pr91323.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  (test for excess errors)
PASS: gcc.dg/torture/pr91323.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  execution test

[Bug target/110796] builtin_iseqsig fails some tests in armv8l-linux-gnueabihf

2023-07-25 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110796

--- Comment #4 from Thiago Jung Bauermann  
---
Thanks for looking into this.

(In reply to Francois-Xavier Coudert from comment #3)
> Do the failure only occur at -Os?

Only at -Os. The FAILs I mentioned in the bug report are the only ones that
occur.

> Does it pass at -O0, -O1, -O2?

Yes.

> And could you possibly run builtin-iseqsig-1.c under gdb and obtain a
> backtrace?

Here it is:

thiago.bauermann@tcwg-jade-03-dev:~/tmp$
/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/gcc/xgcc
-B/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/gcc/
/home/thiago.bauermann/src/gcc/gcc/testsuite/gcc.dg/torture/builtin-iseqsig-1.c
   -fdiagnostics-plain-output-Os  -fsignaling-nans -ggdb3  -lm  -o
./builtin-iseqsig-1.exe
thiago.bauermann@tcwg-jade-03-dev:~/tmp$ gdb builtin-iseqsig-1.exe
Reading symbols from builtin-iseqsig-1.exe...
(gdb) r
Starting program: /home/thiago.bauermann/tmp/builtin-iseqsig-1.exe
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".

Program received signal SIGABRT, Aborted.
__libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47
47  ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S: No such file or
directory.
(gdb) bt
#0  __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47
#1  0xf7e8d2ca in __pthread_kill_implementation (threadid=4160625664,
signo=signo@entry=6,
no_tid=no_tid@entry=0) at pthread_kill.c:43
#2  0xf7e8d30c in __pthread_kill_internal (signo=6, threadid=)
at pthread_kill.c:78
#3  0xf7e5c840 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4  0xf7e4d5e4 in __GI_abort () at abort.c:79
#5  0x00010426 in main ()
at
/home/thiago.bauermann/src/gcc/gcc/testsuite/gcc.dg/torture/builtin-iseqsig-1.c:30
(gdb) frame 5
#5  0x00010426 in main ()
at
/home/thiago.bauermann/src/gcc/gcc/testsuite/gcc.dg/torture/builtin-iseqsig-1.c:30
30if (fetestexcept (FE_INVALID)) __builtin_abort ();
(gdb)

[Bug target/110796] builtin_iseqsig fails some tests in armv8l-linux-gnueabihf

2023-07-25 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110796

--- Comment #7 from Thiago Jung Bauermann  
---
(In reply to Francois-Xavier Coudert from comment #5)
> OK, so it signals FE_INVALID on the first test. Can you run this with the
> same options, and see what happens?

It ran normally:

thiago.bauermann@tcwg-jade-03-dev:~/tmp$ cat test-1.c
#include 
#include 

void
ftrue (float x, float y)
{
if (!__builtin_iseqsig (x, y))
__builtin_abort ();
}

int
main ()
{
volatile float f1, f2;

f1 = 0.f; f2 = 0.f;
if (fetestexcept (FE_INVALID)) printf("Invalid 1\n");
ftrue (f1, f2);
if (fetestexcept (FE_INVALID)) printf("Invalid 2\n");

return 0;
}
thiago.bauermann@tcwg-jade-03-dev:~/tmp$
/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/gcc/xgcc
-B/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/gcc/ test-1.c 
-fdiagnostics-plain-output-Os  -fsignaling-nans -ggdb3  -lm  -o ./test-1
thiago.bauermann@tcwg-jade-03-dev:~/tmp$ ./test-1
thiago.bauermann@tcwg-jade-03-dev:~/tmp$ echo $?
0
thiago.bauermann@tcwg-jade-03-dev:~/tmp$

> One surprising thing is that the directive "dg-add-options ieee" in the test
> did not apparently add any other option for IEEE conformance…

Ah, that's an interesting thread to pull. I'll investigate if there's any
option we should be adding.

[Bug target/110796] builtin_iseqsig fails some tests in armv8l-linux-gnueabihf

2023-07-25 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110796

--- Comment #10 from Thiago Jung Bauermann  
---
(In reply to Francois-Xavier Coudert from comment #8)
> (In reply to Richard Earnshaw from comment #6)
> > Is the exception status supposed to be in a defined state when the test
> > runs?  Shouldn't there be a call to feclearexcept (FE_ALL_EXCEPT) at the
> > start of the test?
> 
> Isn't the exception status guaranteed to be defined (and not signaling) when
> the program starts?
> 
> But adding feclearexcept (FE_ALL_EXCEPT); at the beginning of main() could
> not hurt, for sure.

I tried adding feclearexcept (FE_ALL_EXCEPT); at the beginning of main() but it
didn't make a difference.

[Bug target/111071] New: gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp has new failures since commit e7a36e4715c7

2023-08-18 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111071

Bug ID: 111071
   Summary: gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp
has new failures since commit e7a36e4715c7
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thiago.bauermann at linaro dot org
CC: yanzhang.wang at intel dot com
  Target Milestone: ---

Created attachment 55760
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55760&action=edit
gcc.log from trunk as of commit 4acbb51d7f28

Our CI detected that commit e7a36e4715c7 "[PATCH] RISC-V: Support simplify
(-1-x) for vector." introduced these testsuite failures on aarch64-linux:

=== g++ tests ===

Running g++:g++.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp ...
FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu++98 -O2
-fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies
subr_m1_s8_m
FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu++98 -O2
-fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS 
check-function-bodies subr_m1_s8_m
FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu++98 -O2
-fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies
subr_m1_u8_m
FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu++98 -O2
-fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS 
check-function-bodies subr_m1_u8_m
=== gcc tests ===

Running gcc:gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp ...
FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu90 -O2
-fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies
subr_m1_s8_m
FAIL: gcc.target/aarch64/sve/acle/asm/subr_s8.c -std=gnu90 -O2
-fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS 
check-function-bodies subr_m1_s8_m
FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu90 -O2
-fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_FULL  check-function-bodies
subr_m1_u8_m
FAIL: gcc.target/aarch64/sve/acle/asm/subr_u8.c -std=gnu90 -O2
-fno-schedule-insns -DCHECK_ASM --save-temps -DTEST_OVERLOADS 
check-function-bodies subr_m1_u8_m

I confirmed that they are still present in trunk as of commit 4acbb51d7f28
"Daily bump." from today.

Tested on Ubuntu 22.04 with:

$ ~/src/gcc/configure \
--disable-bootstrap \
--disable-multilib \
&& make -j 60 \
&& make -C gcc check-gcc
RUNTESTFLAGS=gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp

I'll attach gcc.log from trunk as well as from the parent of commit
e7a36e4715c7, which was the last commit where the test passed.

[Bug target/111071] gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp has new failures since commit e7a36e4715c7

2023-08-18 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111071

--- Comment #1 from Thiago Jung Bauermann  
---
Created attachment 55761
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55761&action=edit
gcc.log from commit a32de58c9e63, parent of e7a36e4715c

[Bug middle-end/111125] New: tree-ssa.exp and vect.exp failures after commit 99b5921bfc8f

2023-08-23 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25

Bug ID: 25
   Summary: tree-ssa.exp and vect.exp failures after commit
99b5921bfc8f
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thiago.bauermann at linaro dot org
CC: rguenth at gcc dot gnu.org
  Target Milestone: ---
Target: aarch64

Created attachment 55784
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55784&action=edit
gcc.log from commit 829c0c06fe7b

Our CI detected that commit 99b5921bfc8f "Handle TYPE_OVERFLOW_UNDEFINED
vectorized BB reductions" introduced these testsuite failures on aarch64-linux:

=== gcc tests ===

Running gcc:gcc.dg/tree-ssa/tree-ssa.exp ...
FAIL: gcc.dg/tree-ssa/slsr-11.c scan-tree-dump-times optimized " \\* " 1

Running gcc:gcc.dg/vect/vect.exp ...
FAIL: gcc.dg/vect/bb-slp-29.c -flto -ffat-lto-objects  scan-tree-dump-times
slp1 "optimized: basic block" 1
FAIL: gcc.dg/vect/bb-slp-29.c scan-tree-dump-times slp1 "optimized: basic
block" 1
FAIL: gcc.dg/vect/pr53773.c -flto -ffat-lto-objects  scan-tree-dump-times
optimized "\\* 10" 2
FAIL: gcc.dg/vect/pr53773.c scan-tree-dump-times optimized "\\* 10" 2

I confirmed that they are still present in trunk as of commit 829c0c06fe7b
"Fortran: improve diagnostic message for COMMON with automatic object
[PR32986]" from today.

The tests above fail with these messages found in gcc.log:

- gcc.dg/tree-ssa/slsr-11.c: pattern found 3 times
- gcc.dg/vect/bb-slp-29.c: pattern found 2 times
- gcc.dg/vect/pr53773.c: pattern found 0 times

Tested on Ubuntu 22.04 with:

$ ~/src/gcc/configure \
--disable-bootstrap \
--disable-multilib \
&& make -j 60 \
&& make -C gcc check-gcc RUNTESTFLAGS="gcc.dg/tree-ssa/tree-ssa.exp
gcc.dg/vect/vect.exp"

I'll attach gcc.log from trunk.

[Bug middle-end/111125] [14 Regression] tree-ssa.exp and vect.exp failures after commit r14-3281-g99b5921bfc8f91

2023-08-24 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25

--- Comment #8 from Thiago Jung Bauermann  
---
Confirmed. All the failures I reported are fixed in trunk. Thank you!

[Bug testsuite/111071] [14 Regression] gcc.target/aarch64/sve/acle/aarch64-sve-acle-asm.exp has new failures since commit e7a36e4715c7

2023-09-11 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111071

Thiago Jung Bauermann  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #4 from Thiago Jung Bauermann  
---
Closing.

[Bug tree-optimization/115060] [15 Regression] Probable an issue around usage of vect_look_through_possible_promotion in tree-vect-patterns.cc

2024-08-06 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115060

--- Comment #6 from Thiago Jung Bauermann  
---
(In reply to Feng Xue from comment #5)
> Fixed.

I confirmed that I  don't see the failure anymore.
Thank you!

[Bug other/116260] testsuite-management/validate_failures.py: split multilib ABIs in results

2024-08-08 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116260

Thiago Jung Bauermann  changed:

   What|Removed |Added

 CC||clyon at gcc dot gnu.org

--- Comment #1 from Thiago Jung Bauermann  
---
Hello Sam,

I mostly work with the GDB testsuite, so I'm not very familiar with
GCC-specific details of DejaGNU and the sum files, so advance warning:
naive questions ahead.

I added Christophe Lyon to the Cc list. He's much more familiar with the
GCC testsuite and how we use it.

(In reply to Sam James from comment #0)
> We've started using validate_failures.py in our packaging (and I'm using it
> in my own workflow too) and it's great, thanks for it.

Nice!

> I tried wiring up multilib tests next in our packaging and noticed that the
> manifest ended up mixing results between ABIs, like:

I'm not sure I understand the scenario. Are you doing two testsuite runs,
one for each ABI, and then using the one's manifest to compare with the
other?

> dejagnu emits lines indicating which ABI tests were run for,

Do you mean these lines?

```
Native configuration is armv8l-unknown-linux-gnueabihf

=== gcc tests ===

Schedule of variations:
tcwg-local

Running target tcwg-local
```

> could validate_failures.py handle that and either have a way to ignore
> for a given ABI so it can be re-run with another (from the same
> testsuite results dir), or parse those lines and output some suffixed
> manifest file?

It's possible to add an ABI field to the ResultSet object and then use it
when comparing results.

[Bug target/116589] New: [15 regression] vectorization regressions on aarch64 since gcc-15-1575-gea8061f46a30

2024-09-03 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116589

Bug ID: 116589
   Summary: [15 regression] vectorization regressions on aarch64
since gcc-15-1575-gea8061f46a30
   Product: gcc
   Version: 15.0
Status: UNCONFIRMED
  Keywords: testsuite-fail
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thiago.bauermann at linaro dot org
CC: guihaoc at gcc dot gnu.org
  Target Milestone: ---
Target: aarch64

Since commit gcc-15-1575-gea8061f46a30 we see these regressions on
aarch64-linux-gnu:

=== g++ tests ===

Running g++:g++.target/aarch64/sve/acle/aarch64-sve-acle.exp ...
FAIL: gcc.target/aarch64/sve/acle/general/ldff1_8.c -march=armv8.2-a+sve
-moverride=tune=none  scan-assembler-not \\tptest\\t
FAIL: gcc.target/aarch64/sve/acle/general/ldff1_8.c -march=armv8.2-a+sve
-moverride=tune=none  scan-assembler-not \\trdffr\\t
FAIL: gcc.target/aarch64/sve/acle/general/ldff1_8.c -march=armv8.2-a+sve
-moverride=tune=none  scan-assembler-times \\trdffrs\\t 2

=== gcc tests ===

Running gcc:gcc.target/aarch64/aarch64.exp ...
FAIL: gcc.target/aarch64/vec-init-22-speed.c scan-assembler-times
\\tfmov\\td[0-9]+, x[0-9]+ 2

Running gcc:gcc.target/aarch64/sve/aarch64-sve.exp ...
FAIL: gcc.target/aarch64/sve/ptest_1.c scan-assembler-not \\tptest\\t
FAIL: gcc.target/aarch64/sve/vec_bool_cmp_1.c scan-assembler-times
\\teors?\\tp[0-9]*\\.b, p[0-7]/z, p[0-9]*\\.b, p[0-9]*\\.b\\n 12

Running gcc:gcc.target/aarch64/sve/acle/aarch64-sve-acle.exp ...
FAIL: gcc.target/aarch64/sve/acle/general/ldff1_8.c -march=armv8.2-a+sve
-moverride=tune=none  scan-assembler-not \\tptest\\t
FAIL: gcc.target/aarch64/sve/acle/general/ldff1_8.c -march=armv8.2-a+sve
-moverride=tune=none  scan-assembler-not \\trdffr\\t
FAIL: gcc.target/aarch64/sve/acle/general/ldff1_8.c -march=armv8.2-a+sve
-moverride=tune=none  scan-assembler-times \\trdffrs\\t 2

Configure options:

/home/tcwg-buildslave/workspace/tcwg_gnu_5/abe/snapshots/gcc.git~master/configure
\
SHELL=/bin/bash \
   
--with-mpfr=/home/tcwg-buildslave/workspace/tcwg_gnu_5/abe/builds/destdir/aarch64-unknown-linux-gnu
\
   
--with-gmp=/home/tcwg-buildslave/workspace/tcwg_gnu_5/abe/builds/destdir/aarch64-unknown-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 \
--disable-multilib \
--enable-fix-cortex-a53-835769 \
--enable-fix-cortex-a53-843419 \
--with-arch=armv8-a \
--enable-threads=posix \
--enable-multiarch \
--enable-libstdcxx-time=yes \
--enable-gnu-indirect-function \
--enable-checking=yes \
--disable-bootstrap \
--enable-languages=default \
   
--prefix=/home/tcwg-buildslave/workspace/tcwg_gnu_5/abe/builds/destdir/aarch64-unknown-linux-gnu

[Bug rtl-optimization/116028] [15 regression] gcc.dg/pr10474.c test failure since r15-1619-g3b9b8d6cfdf593

2024-09-03 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116028

Thiago Jung Bauermann  changed:

   What|Removed |Added

 CC||thiago.bauermann at linaro dot 
org

--- Comment #11 from Thiago Jung Bauermann  
---
(In reply to ktkachov from comment #10)
> Reopening as presumably this is now relevant again after the revert from
> g:4734c1bfe837b3e70bc783dafc442de3bca43d88

Thanks! Yes, we are seeing this failure in the Linaro Toolchain CI:

https://linaro.atlassian.net/browse/GNU-1313

[Bug target/116589] [15 regression] vectorization regressions on aarch64 since r15-1575-gea8061f46a30

2024-09-03 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116589

--- Comment #5 from Thiago Jung Bauermann  
---
Thank you for the quick analysis and the testcase fix!

[Bug target/116604] New: [15 regression] regressions on aarch64 since r15-1619-g3b9b8d6cfdf593

2024-09-04 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116604

Bug ID: 116604
   Summary: [15 regression] regressions on aarch64 since
r15-1619-g3b9b8d6cfdf593
   Product: gcc
   Version: 15.0
Status: UNCONFIRMED
  Keywords: testsuite-fail
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thiago.bauermann at linaro dot org
CC: jskumari at gcc dot gnu.org
  Target Milestone: ---
Target: aarch64

Since commit r15-1619-g3b9b8d6cfdf593 we see this vectorization regression on
aarch64-linux-gnu:

Running gcc:gcc.target/aarch64/sve/pcs/aarch64-sve-pcs.exp ...
FAIL: gcc.target/aarch64/sve/pcs/args_1.c -march=armv8.2-a+sve
-fno-stack-protector  check-function-bodies callee_pred

The failure is:

body: \taddvl   sp, sp, #-1
\tstr   p[0-9]+, \[sp\]
\tstr   p[0-9]+, \[sp, #1, mul vl\]
\tldr   (p[0-9]+), \[x0\]
\tldr   (p[0-9]+), \[x1\]
\tbrkpa (p[0-7])\.b, p0/z, p1\.b, p2\.b
\tbrkpb (p[0-7])\.b, \3/z, p3\.b, \1\.b
\tbrka  p0\.b, \4/z, \2\.b
\tldr   p[0-9]+, \[sp\]
\tldr   p[0-9]+, \[sp, #1, mul vl\]
\taddvl sp, sp, #1
\tret

against:addvl   sp, sp, #-1
str p14, [sp]
str p15, [sp, #1, mul vl]
mov p14.b, p3.b
ldr p15, [x0]
ldr p3, [x1]
brkpa   p0.b, p0/z, p1.b, p2.b
brkpb   p0.b, p0/z, p14.b, p15.b
brkap0.b, p0/z, p3.b
ldr p14, [sp]
ldr p15, [sp, #1, mul vl]
addvl   sp, sp, #1
ret

The difference in expected vs actual is that there's an extra instruction "mov
p14.b, p3.b", and also in the brkpb instruction p14.b is used instead of the
expected p3.b.

We also see regressions in other testcases on arm-linux-gnueabihf and yet
others on arm-none-eabi, but I'll file separate bugzillas for those.

[Bug target/116623] New: [15 regression] regressions on arm-linux-gnueabihf since r15-1619-g3b9b8d6cfdf593

2024-09-05 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116623

Bug ID: 116623
   Summary: [15 regression] regressions on arm-linux-gnueabihf
since r15-1619-g3b9b8d6cfdf593
   Product: gcc
   Version: 15.0
Status: UNCONFIRMED
  Keywords: testsuite-fail
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thiago.bauermann at linaro dot org
CC: jskumari at gcc dot gnu.org
  Target Milestone: ---
Target: arm

Since commit r15-1619-g3b9b8d6cfdf593 we see these regressions on
armv8l-linux-gnueabihf:

Running gcc:gcc.target/arm/arm.exp ...
FAIL: gcc.target/arm/bfloat16_scalar_1_1.c check-function-bodies bfloat_mov_mr
FAIL: gcc.target/arm/bfloat16_scalar_1_2.c check-function-bodies bfloat_mov_mr
FAIL: gcc.target/arm/bfloat16_scalar_2_1.c check-function-bodies bfloat_mov_mr
FAIL: gcc.target/arm/bfloat16_scalar_2_2.c check-function-bodies bfloat_mov_mr
FAIL: gcc.target/arm/bfloat16_scalar_3_1.c check-function-bodies bfloat_mov_mr
FAIL: gcc.target/arm/bfloat16_scalar_3_2.c check-function-bodies bfloat_mov_mr
Running gcc:gcc.target/arm/mve/mve.exp ...
FAIL: gcc.target/arm/mve/dlstp-compile-asm-2.c check-function-bodies test5
FAIL: gcc.target/arm/mve/dlstp-compile-asm-2.c check-function-bodies test8

The bfloat16_scalar_*.c failures are all about the same code change:

body: .*\tldrh  r4, \[.*\]  @ __bf16
.*\tbx  lr

against:push{r4}
sub sp, sp, #12
#foo
ldrhr3, [sp, #6]@ __bf16
mov r4, r3  @ __bf16
#foo
add sp, sp, #12
ldr r4, [sp], #4
bx  lr

Diff from before and after assembly file:

--- before/bfloat16_scalar_1_1.s2024-09-05 20:19:02.0 -0300
+++ after/bfloat16_scalar_1_1.s 2024-09-05 19:57:59.0 -0300
@@ -193,7 +193,8 @@
 @ 0 "" 2
.thumb
.syntax unified
-   ldrhr4, [sp, #6]@ __bf16
+   ldrhr3, [sp, #6]@ __bf16
+   mov r4, r3  @ __bf16
.syntax unified
 @ 117
"/home/thiago.bauermann/src/gcc/gcc/testsuite/gcc.target/arm/bfloat16_scalar_1_1.c"
1
#foo

The gcc.target/arm/mve/dlstp-compile-asm-2.c failures are a bit more involved:

body: .*\tdlstp.8   lr, r[0-9]+
.*\tvldrb.8 q[0-9]+, \[r1\]
\tvldrb.8   q[0-9]+, \[r2\]
.*\tvadd.i8 (q[0-9]+), q[0-9]+, q[0-9]+
.*\tvstrb.8 \1, \[r2\]
\tvstrb.8   \1, \[r3\]
\tletp  lr, .*
.*
against:push{r4, r5, r6, lr}
ldr ip, [sp, #16]
cmp ip, #0
ble .L37
mov r6, r3
sub r3, ip, #16
add r5, r2, ip
add r4, r1, ip
add r0, r0, ip
dlstp.8 lr, ip
sub r2, r4, ip
sub r1, r0, ip
vldrb.8 q3, [r1]
vldrb.8 q2, [r2]
sub r2, r5, ip
mov ip, r3
subsr3, r3, #16
vadd.i8 q3, q3, q2
vstrb.8 q3, [r2]
vstrb.8 q3, [r6]
letplr, .L39
pop {r4, r5, r6, pc}

FAIL: gcc.target/arm/mve/dlstp-compile-asm-2.c check-function-bodies test5

body: .*\tdlstp.32  lr, r3
\tvldrw.32  q[0-9]+, \[r0\], #16
\tvctp.32   r4
\tvpst
\tvldrwt.32 q[0-9]+, \[r1\], #16
.*\tvadd.i32(q[0-9]+), q[0-9]+, q[0-9]+
\tvstrw.32  \1, \[r2\], #16
\tletp  lr, .*
.*
against:push{lr}
ldr ip, [sp, #4]
cmp r3, #0
ble .L59
dlstp.32lr, r3
vldrw.32q3, [r0], #16
vctp.32 ip
vpst
vldrwt.32   q2, [r1], #16
add ip, ip, #1
vadd.i32q3, q3, q2
vstrw.32q3, [r2], #16
letplr, .L61
ldr pc, [sp], #4

FAIL: gcc.target/arm/mve/dlstp-compile-asm-2.c check-function-bodies test8

Diff from before and after assembly file:

--- before/dlstp-compile-asm-2.s2024-09-05 20:14:36.0 -0300
+++ after/dlstp-compile-asm-2.s 2024-09-05 20:10:07.0 -0300
@@ -140,25 +140,26 @@
@ args = 4, pretend = 0, frame = 0
@ frame_needed = 0, uses_anonymous_args = 0
push{r4, r5, r6, lr}
-   ldr r4, [sp, #16]
-   cmp r4, #0
+   ldr ip, [sp, #16]
+   cmp ip, #0
ble .L37
-   sub ip, r4, #16
-   addsr6, r2, r4
-   addsr5, r1, r4
-   add r0, r0, r4
-   dlstp.8 lr, r4
+   mov r6, r3
+   sub r3, ip, #16
+   add r5, r2, ip
+   add r4, r1, ip
+   add r0, r0, ip
+   dlstp.8 lr, ip
 .L39:
-   subsr2, r5, r4
-   subsr1, r0, r4
+   sub r2, r4, ip
+   sub r1, r0, ip
vldrb.8 q3, [r1]
vldrb.8 q2, [r2]
-   subsr2, r6, r4
-   mov r4, ip
-   sub ip, ip, #16
+   sub r2, r5, ip
+   mov ip, r3
+   subsr3, r3, #16
vadd.i8 

[Bug target/116625] New: [15 regression] regressions on arm-eabi since r15-1619-g3b9b8d6cfdf593

2024-09-05 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116625

Bug ID: 116625
   Summary: [15 regression] regressions on arm-eabi since
r15-1619-g3b9b8d6cfdf593
   Product: gcc
   Version: 15.0
Status: UNCONFIRMED
  Keywords: testsuite-fail
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thiago.bauermann at linaro dot org
CC: jskumari at gcc dot gnu.org
  Target Milestone: ---
Target: arm

Created attachment 59056
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59056&action=edit
diff of all generated assembly files

Since commit r15-1619-g3b9b8d6cfdf593 we see on arm-eabi all the regressions
reported in bug 116623, plus the ones below:

Running gcc:gcc.target/arm/cmse/cmse.exp ...
FAIL: gcc.target/arm/cmse/mainline/8_1m/bitfield-4.c -march=armv8.1-m.main+fp
-mthumb  -O2   scan-assembler lsls\t(r[3-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/bitfield-4.c -march=armv8.1-m.main+fp
-mthumb  -O2   scan-assembler lsrs\t(r[3-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/bitfield-4.c -march=armv8.1-m.main+fp
-mthumb  -O3 -g   scan-assembler lsls\t(r[3-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/bitfield-4.c -march=armv8.1-m.main+fp
-mthumb  -O3 -g   scan-assembler lsrs\t(r[3-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/bitfield-6.c -march=armv8.1-m.main+fp
-mthumb  -O2   scan-assembler lsls\t(r[3-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/bitfield-6.c -march=armv8.1-m.main+fp
-mthumb  -O2   scan-assembler lsrs\t(r[3-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/bitfield-6.c -march=armv8.1-m.main+fp
-mthumb  -O3 -g   scan-assembler lsls\t(r[3-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/bitfield-6.c -march=armv8.1-m.main+fp
-mthumb  -O3 -g   scan-assembler lsrs\t(r[3-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/bitfield-8.c -march=armv8.1-m.main+fp
-mthumb  -O2   scan-assembler lsls\t(r[3-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/bitfield-8.c -march=armv8.1-m.main+fp
-mthumb  -O2   scan-assembler lsrs\t(r[3-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/bitfield-8.c -march=armv8.1-m.main+fp
-mthumb  -O3 -g   scan-assembler lsls\t(r[3-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/bitfield-8.c -march=armv8.1-m.main+fp
-mthumb  -O3 -g   scan-assembler lsrs\t(r[3-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/bitfield-and-union.c
-march=armv8.1-m.main+fp -mthumb  -O1   scan-assembler
lsls\t(r[4-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/bitfield-and-union.c
-march=armv8.1-m.main+fp -mthumb  -O1   scan-assembler
lsrs\t(r[4-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/bitfield-and-union.c
-march=armv8.1-m.main+fp -mthumb  -O2   scan-assembler
lsls\t(r[4-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/bitfield-and-union.c
-march=armv8.1-m.main+fp -mthumb  -O2   scan-assembler
lsrs\t(r[4-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/bitfield-and-union.c
-march=armv8.1-m.main+fp -mthumb  -O3 -g   scan-assembler
lsls\t(r[4-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/bitfield-and-union.c
-march=armv8.1-m.main+fp -mthumb  -O3 -g   scan-assembler
lsrs\t(r[4-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/union-2.c -march=armv8.1-m.main+fp
-mthumb  -O2   scan-assembler lsls\t(r[3-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/union-2.c -march=armv8.1-m.main+fp
-mthumb  -O2   scan-assembler lsrs\t(r[3-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/union-2.c -march=armv8.1-m.main+fp
-mthumb  -O3 -g   scan-assembler lsls\t(r[3-9]|r10|fp|ip), \\1, #1.*blxns\t\\1
FAIL: gcc.target/arm/cmse/mainline/8_1m/union-2.c -march=armv8.1-m.main+fp
-mthumb  -O3 -g   scan-assembler lsrs\t(r[3-9]|r10|fp|ip), \\1, #1.*blxns\t\\1

In all of the failures above, the problem is that GCC is now using lsr/lsl
instructions rather than lsrs/lsls. For example:

diff -u '--color=auto' -pruN before/bitfield-4-O2.s after/bitfield-4-O2.s
--- before/bitfield-4-O2.s  2024-09-06 00:14:05.084343596 -0300
+++ after/bitfield-4-O2.s   2024-09-05 23:44:18.400186871 -0300
@@ -29,14 +29,14 @@ main:
mov r0, #-1
mov r1, #-1
mov r2, #-1
-   push{r4, lr}
-   sub sp, sp, #16
+   push{lr}
+   sub sp, sp, #20
strdr0, [sp]
str r2, [sp, #8]
ldm sp, {r0, r1, r2}
-   mov r4, #2097152
-

[Bug target/116625] [15 regression] regressions on arm-eabi since r15-1619-g3b9b8d6cfdf593

2024-09-05 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116625

--- Comment #2 from Thiago Jung Bauermann  
---
(In reply to Andrew Pinski from comment #1)
> Since the difference is in main, I suspect if the function was named
> differently there would be no difference. That is main is known to be called
> once so the frequence of this is being taken into account.
> 
> I suspect this is just a testcase issue.

Did I understand your suggestion correctly?

diff --git a/gcc/testsuite/gcc.target/arm/cmse/bitfield-4.x
b/gcc/testsuite/gcc.target/arm/cmse/bitfield-4.x
index 62e35cc3cb8e..a8ec77785a48 100644
--- a/gcc/testsuite/gcc.target/arm/cmse/bitfield-4.x
+++ b/gcc/testsuite/gcc.target/arm/cmse/bitfield-4.x
@@ -24,7 +24,7 @@ typedef void __attribute__ ((cmse_nonsecure_call)) (*foo_ns)
(test_st);
 extern void foo (test_st st);

 int
-main (void)
+blah (void)
 {
   read_st r;
   foo_ns f;

I tried the above (also applied to the other tests reported here) but it didn't
work.

[Bug target/116625] [15 regression] regressions on arm-eabi since r15-1619-g3b9b8d6cfdf593

2024-09-05 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116625

--- Comment #4 from Thiago Jung Bauermann  
---
Thank you for the explanation! I must confess that most of it went over my
head...

(In reply to Andrew Pinski from comment #3)
> So yes this is just a testcase issue. Just needs a small testcase change.
> 
> I think s/lsls/lsl(s)/ and s/lsrs/lsr(s)/ will fix the issue.

lsl(s) and lsr(s) didn't work, but lsls? and lsrs? did.

Do you want me to send a patch or will you do it? I can copy and paste your
explanation of what is going on and try to build a coherent commit message.

[Bug target/91970] arm: 64bit int to double conversion does not respect rounding mode

2024-04-10 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91970

Thiago Jung Bauermann  changed:

   What|Removed |Added

 CC||thiago.bauermann at linaro dot 
org

--- Comment #14 from Thiago Jung Bauermann  
---
This came up in the context of a Linux kernel patch series providing a "Unified
cross-architecture kernel-mode FPU API" because the AMD GPU driver fails to
build on arm with the series applied because of this issue:

https://lore.kernel.org/linux-arm-kernel/75a37a4b-f516-40a3-b6b5-4aa1636f9...@sifive.com/

Copying the patch author's response here:

> In both cases, the issue is that the toolchain requires runtime support to
> convert between `unsigned long long` and `double`, even when hardware FP is
> enabled. There was some past discussion about GCC inlining some of these
> conversions[1], but that did not get implemented.
> 
> The short-term fix would be to drop the `select ARCH_HAS_KERNEL_FPU_SUPPORT`
> for 32-bit arm until we can provide these runtime library functions.

[Bug target/91970] arm: 64bit int to double conversion does not respect rounding mode

2024-04-10 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91970

--- Comment #16 from Thiago Jung Bauermann  
---
(In reply to Andrew Pinski from comment #15)
> (In reply to Thiago Jung Bauermann from comment #14)
> > This came up in the context of a Linux kernel patch series providing a
> > "Unified cross-architecture kernel-mode FPU API" because the AMD GPU driver
> > fails to build on arm with the series applied because of this issue:
> > 
> > https://lore.kernel.org/linux-arm-kernel/75a37a4b-f516-40a3-b6b5-
> > 4aa1636f9...@sifive.com/
> 
> That is a totally unrelated issue from this one. The issue there is arm EABI
> defines the function names rather than GCC and GCC follows the ARM EABI here
> (so does clang/LLVM). so you would need to do a similar renaming for the
> functions on arm (32bit).

Thank you! I relayed your point (hopefully correctly) in the email thread
above.

[Bug target/115253] New: New tests added by r14-10122-gad45086178d833 fail on Cortex M23 and M55 bare metal targets

2024-05-27 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115253

Bug ID: 115253
   Summary: New tests added by r14-10122-gad45086178d833 fail on
Cortex M23 and M55 bare metal targets
   Product: gcc
   Version: 15.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thiago.bauermann at linaro dot org
  Target Milestone: ---

Commit g:ad45086178d833254d66fab518b14234418f002b, r14-10122-gad45086178d833,
introduces the tests gcc.target/arm/cmse/extend-param.c and
gcc.target/arm/cmse/extend-return.c.

They have the following failures on --with-cpu=cortex-m23, --with-float=soft,
--target=arm-eabi (full configure flags further below):

Running gcc:gcc.target/arm/cmse/cmse.exp ...
FAIL: gcc.target/arm/cmse/extend-param.c -O0   check-function-bodies
__acle_se_boolSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O0   check-function-bodies
__acle_se_enumSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O0   check-function-bodies
__acle_se_shortSignSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O0   check-function-bodies
__acle_se_shortUnsignSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O0   check-function-bodies
__acle_se_signSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O0   check-function-bodies
__acle_se_unsignSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O1   check-function-bodies
__acle_se_boolSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O1   check-function-bodies
__acle_se_enumSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O1   check-function-bodies
__acle_se_shortSignSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O1   check-function-bodies
__acle_se_shortUnsignSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O1   check-function-bodies
__acle_se_signSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O1   check-function-bodies
__acle_se_unsignSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O2   check-function-bodies
__acle_se_boolSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O2   check-function-bodies
__acle_se_enumSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O2   check-function-bodies
__acle_se_shortSignSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O2   check-function-bodies
__acle_se_shortUnsignSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O2   check-function-bodies
__acle_se_signSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O2   check-function-bodies
__acle_se_unsignSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O3 -g   check-function-bodies
__acle_se_boolSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O3 -g   check-function-bodies
__acle_se_enumSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O3 -g   check-function-bodies
__acle_se_shortSignSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O3 -g   check-function-bodies
__acle_se_shortUnsignSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O3 -g   check-function-bodies
__acle_se_signSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -O3 -g   check-function-bodies
__acle_se_unsignSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -Os   check-function-bodies
__acle_se_boolSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -Os   check-function-bodies
__acle_se_enumSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -Os   check-function-bodies
__acle_se_shortSignSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -Os   check-function-bodies
__acle_se_shortUnsignSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -Os   check-function-bodies
__acle_se_signSecureFunc
FAIL: gcc.target/arm/cmse/extend-param.c -Os   check-function-bodies
__acle_se_unsignSecureFunc
UNRESOLVED: gcc.target/arm/cmse/extend-return.c -O0   check-function-bodies
boolNonsecure0
UNRESOLVED: gcc.target/arm/cmse/extend-return.c -O0   check-function-bodies
enumNonsecure0
UNRESOLVED: gcc.target/arm/cmse/extend-return.c -O0   check-function-bodies
shortSignNonsecure0
UNRESOLVED: gcc.target/arm/cmse/extend-return.c -O0   check-function-bodies
shortUnsignNonsecure0
UNRESOLVED: gcc.target/arm/cmse/extend-return.c -O0   check-function-bodies
signNonsecure0
UNRESOLVED: gcc.target/arm/cmse/extend-return.c -O0   check-function-bodies
unsignNonsecure0
FAIL: gcc.target/arm/cmse/extend-return.c -O0  (internal compiler error: in
extract_insn, at recog.cc:2812)
FAIL: gcc.target/arm/cmse/extend-return.c -O0  (test for excess errors)
UNRESOLVED: gcc.target/arm/cmse/extend-return.c -O1   check-function-bodies
boolNonsecure0
UNRESOLVED: gcc.target/arm/cmse/extend-return.c -O1   check-function-bodies
enumNonsecure0
UNRESOLVED: gcc.target/arm/cmse/extend-return.c -O1   check-function-bodies
shortSignNonsecure0
UNRESOLVED: gcc.target/arm/cmse/extend-return.c -O1   check-function-bodies
shortUnsignNonsecure0
UNRESOLVED: gcc.target/arm/cmse/extend-return.c -O1   check-function-bodies
signNonsecure0
UNRESOLVED: gcc.target/arm/cm

[Bug target/115253] New tests added by r14-10122-gad45086178d833 fail on Cortex M23 and M55 bare metal targets

2024-05-27 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115253

--- Comment #1 from Thiago Jung Bauermann  
---
Created attachment 58297
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58297&action=edit
gcc.log for Cortext M23

[Bug target/115253] New tests added by r14-10122-gad45086178d833 fail on Cortex M23 and M55 bare metal targets

2024-05-27 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115253

--- Comment #2 from Thiago Jung Bauermann  
---
Created attachment 58298
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58298&action=edit
gcc.log for Cortext M55

These log files were obtained with GCC commit
g:c5a7628470a7fb801ebeea82e16a4549db43bfa5, r15-853-gc5a7628470a7fb.

[Bug target/115253] New tests added by r14-10122-gad45086178d833 fail on Cortex M23 and M55 bare metal targets

2024-05-27 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115253

Thiago Jung Bauermann  changed:

   What|Removed |Added

 CC||andre.simoesdiasvieira@arm.
   ||com, Richard.Ball at arm dot 
com

--- Comment #3 from Thiago Jung Bauermann  
---
CCing commit authors.

[Bug analyzer/111802] New: New analyser diagram failures since commit b365e9d57ad4

2023-10-13 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111802

Bug ID: 111802
   Summary: New analyser diagram failures since commit
b365e9d57ad4
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: analyzer
  Assignee: dmalcolm at gcc dot gnu.org
  Reporter: thiago.bauermann at linaro dot org
  Target Milestone: ---
Target: armv8l-linux-gnueabihf

Created attachment 56102
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56102&action=edit
Testsuite logs of analyser.exp from today's trunk.

After commit b365e9d57ad4 ("analyzer: improvements to out-of-bounds diagrams
[PR55]"), the following failures started appearing on
armv8l-linux-gnueabihf:

=== g++ tests ===

Running g++:g++.dg/analyzer/analyzer.exp ...
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat-2.c -std=c++14  2
blank line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat-2.c -std=c++14 
expected multiline pattern lines 50-73
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat-2.c -std=c++14 (test
for excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat-2.c -std=c++17  2
blank line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat-2.c -std=c++17 
expected multiline pattern lines 50-73
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat-2.c -std=c++17 (test
for excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat-2.c -std=c++20  2
blank line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat-2.c -std=c++20 
expected multiline pattern lines 50-73
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat-2.c -std=c++20 (test
for excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat-2.c -std=c++98  2
blank line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat-2.c -std=c++98 
expected multiline pattern lines 50-73
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat-2.c -std=c++98 (test
for excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat.c -std=c++14  2 blank
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat.c -std=c++14  expected
multiline pattern lines 42-65
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat.c -std=c++14 (test for
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat.c -std=c++17  2 blank
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat.c -std=c++17  expected
multiline pattern lines 42-65
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat.c -std=c++17 (test for
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat.c -std=c++20  2 blank
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat.c -std=c++20  expected
multiline pattern lines 42-65
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat.c -std=c++20 (test for
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat.c -std=c++98  2 blank
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat.c -std=c++98  expected
multiline pattern lines 42-65
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat.c -std=c++98 (test for
excess errors)
=== gcc tests ===

Running gcc:gcc.dg/analyzer/analyzer.exp ...
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat-2.c (test for excess
errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat-2.c 2 blank line(s) in
output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat-2.c expected multiline
pattern lines 23-46
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat.c (test for excess
errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat.c 2 blank line(s) in
output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-strcat.c expected multiline
pattern lines 15-38
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-17.c expected multiline pattern
lines 14-35
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-18.c expected multiline pattern
lines 14-43
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-19.c expected multiline pattern
lines 25-46

They appear on builds configured with ‘--with-build-config=bootstrap-lto’, but
not on builds with just ‘--enable-bootstrap’, nor in builds configured with
‘--disable-bootstrap’, so perhaps it's an issue with LTO?

The failures happen because the string literal indexes in the diagrams are all
“[1]” instead of the expected “[0]”, “[1]”, “[2]”, etc. E.g.:

FAIL: gcc.dg/analyzer/out-of-bounds-diagram-17.c expected multiline pattern
lines 14-35
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-17.c 2 blank line(s) in output
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-17.c (test for excess errors)
Excess errors:
 ┌┬┬┬┬┐┌─┬─┬─┐
 │[1] │[1] │[1] │[1] │[1] ││ [1] │ [1] │ [1] │
 

[Bug debug/110308] [14 Regression] ICE on audiofile-0.3.6: RTL: vartrack: Segmentation fault in mode_to_precision(machine_mode)

2023-06-22 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110308

Thiago Jung Bauermann  changed:

   What|Removed |Added

 CC||thiago.bauermann at linaro dot 
org

--- Comment #14 from Thiago Jung Bauermann  
---
(In reply to manolis.tsamis from comment #10)
> Created attachment 55369 [details]
> ICE-fix-proposal-1

This patch fixes the ICEs I reported on the mailing list with profiled
bootstrap lto in both armv8l-linux-gnueabihf and aarch64-linux-gnu. Thanks!

[Bug fortran/110371] New: gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90

2023-06-22 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110371

Bug ID: 110371
   Summary: gfortran ICE "verify_gimple failed" in
gfortran.dg/vect/pr51058-2.f90
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thiago.bauermann at linaro dot org
  Target Milestone: ---

Created attachment 55387
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55387&action=edit
Output of running gfortran with -freport-bug

In today's trunk (tested commit 33ebb0dff9bb "configure: Implement
--enable-host-bind-now") I get these new failures on aarch64-linux-gnu:

Running gcc:gcc.target/aarch64/sve/aarch64-sve.exp ...
FAIL: gcc.target/aarch64/sve/pack_fcvt_signed_1.c scan-assembler-times
\\tfcvtzs\\tz[0-9]+\\.s, p[0-7]/m, z[0-9]+\\.d\\n 2
FAIL: gcc.target/aarch64/sve/pack_fcvt_signed_1.c scan-assembler-times
\\tuzp1\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
FAIL: gcc.target/aarch64/sve/pack_fcvt_unsigned_1.c scan-assembler-times
\\tfcvtzu\\tz[0-9]+\\.s, p[0-7]/m, z[0-9]+\\.d\\n 2
FAIL: gcc.target/aarch64/sve/pack_fcvt_unsigned_1.c scan-assembler-times
\\tuzp1\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
FAIL: gcc.target/aarch64/sve/unpack_fcvt_signed_1.c scan-assembler-times
\\tscvtf\\tz[0-9]+\\.d, p[0-7]/m, z[0-9]+\\.s\\n 2
FAIL: gcc.target/aarch64/sve/unpack_fcvt_signed_1.c scan-assembler-times
\\tzip1\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
FAIL: gcc.target/aarch64/sve/unpack_fcvt_signed_1.c scan-assembler-times
\\tzip2\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
FAIL: gcc.target/aarch64/sve/unpack_fcvt_unsigned_1.c scan-assembler-times
\\tucvtf\\tz[0-9]+\\.d, p[0-7]/m, z[0-9]+\\.s\\n 2
FAIL: gcc.target/aarch64/sve/unpack_fcvt_unsigned_1.c scan-assembler-times
\\tzip1\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
FAIL: gcc.target/aarch64/sve/unpack_fcvt_unsigned_1.c scan-assembler-times
\\tzip2\\tz[0-9]+\\.s, z[0-9]+\\.s, z[0-9]+\\.s\\n 1
=== gfortran tests ===

Running gfortran:gfortran.dg/dg.exp ...
FAIL: gfortran.dg/pr68251.f90 -O  (internal compiler error: verify_gimple
failed)
FAIL: gfortran.dg/pr68251.f90 -O  (test for excess errors)

Running gfortran:gfortran.dg/vect/vect.exp ...
FAIL: gfortran.dg/vect/pr51058-2.f90 -O  (internal compiler error:
verify_gimple failed)
FAIL: gfortran.dg/vect/pr51058-2.f90 -O  (test for excess errors)

Looking into this failure:

FAIL: gfortran.dg/vect/pr51058-2.f90 -O  (internal compiler error:
verify_gimple failed)

The problem is:

spawn -ignore SIGHUP
/home/thiago.bauermann/.cache/builds/gcc-wt-native/gcc/testsuite/gfortran/../../gfortran
-B/home/thiago.bauermann/.cache/builds/gcc-wt-native/gcc/testsuite/gfortran/../../
-B/home/thiago.bauermann/.cache/builds/gcc-wt-native/aarch64-unknown-linux-gnu/./libgfortran/
/home/thiago.bauermann/src/gcc-wt/gcc/testsuite/gfortran.dg/vect/pr51058-2.f90
-fdiagnostics-plain-output -fdiagnostics-plain-output -O -O2 -ftree-vectorize
-fvect-cost-model=unlimited -fdump-tree-vect-details -S -o pr51058-2.s
/home/thiago.bauermann/src/gcc-wt/gcc/testsuite/gfortran.dg/vect/pr51058-2.f90:3:18:
Error: invalid types in nop conversion
real(kind=8)
integer(kind=4)
vect__53.48_312 = (vector(2) real(kind=8)) vect__54.46_306;
/home/thiago.bauermann/src/gcc-wt/gcc/testsuite/gfortran.dg/vect/pr51058-2.f90:3:18:
Error: invalid types in nop conversion
real(kind=8)
integer(kind=4)
vect__53.48_314 = (vector(2) real(kind=8)) vect__54.46_308;
during GIMPLE pass: vect
dump file: pr51058-2.f90.173t.vect
/home/thiago.bauermann/src/gcc-wt/gcc/testsuite/gfortran.dg/vect/pr51058-2.f90:3:18:
internal compiler error: verify_gimple failed
0xf5844b verify_gimple_in_cfg(function*, bool, bool)
/home/thiago.bauermann/src/gcc-wt/gcc/tree-cfg.cc:5646
0xde3e03 execute_function_todo
/home/thiago.bauermann/src/gcc-wt/gcc/passes.cc:2098
0xde442f execute_todo
/home/thiago.bauermann/src/gcc-wt/gcc/passes.cc:2152
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
compiler exited with status 1
FAIL: gfortran.dg/vect/pr51058-2.f90   -O  (internal compiler error:
verify_gimple failed)

I'm attaching the output of running with -freport-bug, and also the generated
dump file.

Our CI bisected the problem to commit 6f19cf752616 "Use intermiediate integer
type for float_expr/fix_trunc_expr when direct optab is not existed."
And indeed, if I revert that commit from trunk, all the mentioned tests pass.

[Bug fortran/110371] gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90

2023-06-22 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110371

--- Comment #1 from Thiago Jung Bauermann  
---
Created attachment 55388
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55388&action=edit
Dump file.

This is the dump file generated by the -freport-bug run from the previous
attachment.

[Bug tree-optimization/110371] [14 Regression] gfortran ICE "verify_gimple failed" in gfortran.dg/vect/pr51058-2.f90 since r14-2007

2023-06-26 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110371

Thiago Jung Bauermann  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #10 from Thiago Jung Bauermann  
---
Your commit fixed the gfortran failures I reported, thank you!

The aarch64-sve.exp failures are still there, but it's a separate issue.

[Bug target/110727] New: gcc.target/aarch64/sve/aarch64-sve.exp has two new failures since commit 061f74c0673

2023-07-18 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110727

Bug ID: 110727
   Summary: gcc.target/aarch64/sve/aarch64-sve.exp has two new
failures since commit 061f74c0673
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thiago.bauermann at linaro dot org
  Target Milestone: ---

Created attachment 55574
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55574&action=edit
Tarball containing testsuite log files for first bad and last good commits.

Our CI detected that commit 061f74c06735 "Fix profile update in
scale_profile_for_vect_loop" introduced these testsuite failures on
aarch64-linux:

Running gcc:gcc.target/aarch64/sve/aarch64-sve.exp ...
FAIL: gcc.target/aarch64/sve/live_1.c scan-assembler-times
\\twhilelo\\tp[0-7].b,  2
FAIL: gcc.target/aarch64/sve/live_1.c scan-assembler-times
\\twhilelo\\tp[0-7].h,  4

I confirmed that they are still present in trunk as of commit c11a3aedec26
"tree-ssa-loop-ch improvements, part 3" from today.

Tested on Ubuntu 22.04 with:

$ ~/src/gcc/configure --disable-bootstrap --disable-multilib && make -j 60
$ make -C gcc check-c RUNTESTFLAGS=gcc.target/aarch64/sve/aarch64-sve.exp

I'll attach gcc.sum and gcc.log from commit c11a3aedec26 as well as gcc.sum and
gcc.log from its parent, which was the last commit where the test passed.

[Bug c++/110742] New: [14 Regression] cc1plus ICE "Floating point exception" during profiled bootstrap since commit 08b99fe8ad6

2023-07-19 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110742

Bug ID: 110742
   Summary: [14 Regression] cc1plus ICE "Floating point exception"
during profiled bootstrap since commit 08b99fe8ad6
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thiago.bauermann at linaro dot org
CC: saaadhu at gcc dot gnu.org
  Target Milestone: ---
  Host: armv8l-unknown-linux-gnueabihf
Target: armv8l-unknown-linux-gnueabihf

Created attachment 55583
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55583&action=edit
Output of running with "-v -save-temps -freport-bug".

Our CI detected that commit 08b99fe8ad6c "ira: Skip empty regclass when setting
up reg class relations" introduced an ICE in a profiled bootstrap build on
armv8l-linux-gnueabihf:

/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/./prev-gcc/xg++
-B/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/./prev-gcc/
-B/usr/local/armv8l-unknown-linux-gnueabihf/bin/ -nostdinc++
-B/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/prev-armv8l-unknown-linux-gnueabihf/libstdc++-v3/src/.libs
-B/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/prev-armv8l-unknown-linux-gnueabihf/libstdc++-v3/libsupc++/.libs

-I/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/prev-armv8l-unknown-linux-gnueabihf/libstdc++-v3/include/armv8l-unknown-linux-gnueabihf

-I/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/prev-armv8l-unknown-linux-gnueabihf/libstdc++-v3/include
 -I/home/thiago.bauermann/src/gcc/libstdc++-v3/libsupc++
-L/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/prev-armv8l-unknown-linux-gnueabihf/libstdc++-v3/src/.libs
-L/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/prev-armv8l-unknown-linux-gnueabihf/libstdc++-v3/libsupc++/.libs
 -fno-PIE -c   -g -O2 -fno-checking -gtoggle -fprofile-generate -DIN_GCC   
-fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute
-Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H
-fno-PIE -I. -I. -I/home/thiago.bauermann/src/gcc/gcc
-I/home/thiago.bauermann/src/gcc/gcc/.
-I/home/thiago.bauermann/src/gcc/gcc/../include 
-I/home/thiago.bauermann/src/gcc/gcc/../libcpp/include
-I/home/thiago.bauermann/src/gcc/gcc/../libcody 
-I/home/thiago.bauermann/src/gcc/gcc/../libdecnumber
-I/home/thiago.bauermann/src/gcc/gcc/../libdecnumber/dpd -I../libdecnumber
-I/home/thiago.bauermann/src/gcc/gcc/../libbacktrace   -o ira.o -MT ira.o -MMD
-MP -MF ./.deps/ira.TPo /home/thiago.bauermann/src/gcc/gcc/ira.cc
during GIMPLE pass: slp
/home/thiago.bauermann/src/gcc/gcc/ira.cc: In function ‘void
setup_reg_class_relations()’:
/home/thiago.bauermann/src/gcc/gcc/ira.cc:1198:1: internal compiler error:
Floating point exception
 1198 | setup_reg_class_relations (void)
  | ^
0x12ff9a5 crash_signal
/home/thiago.bauermann/src/gcc/gcc/toplev.cc:314
0xf7a0d6df ???
../sysdeps/unix/sysv/linux/arm/sigrestorer.S:64
0xf79fdb05 ???
../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:46
0xf7a3d2c9 __pthread_kill_implementation
./nptl/pthread_kill.c:43
0xf7a0c83f __GI_raise
../sysdeps/posix/raise.c:26
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
make[3]: *** [Makefile:1181: ira.o] Error 1
make[3]: Leaving directory
'/home/thiago.bauermann/.cache/builds/gcc-native-aarch32/gcc'
make[2]: *** [Makefile:5150: all-stageprofile-gcc] Error 2
make[2]: Leaving directory
'/home/thiago.bauermann/.cache/builds/gcc-native-aarch32'
make[1]: *** [Makefile:26321: stageprofile-bubble] Error 2
make[1]: Leaving directory
'/home/thiago.bauermann/.cache/builds/gcc-native-aarch32'
make: *** [Makefile:1085: all] Error 2

I confirmed that the problem is still present in trunk as of commit
e029635cb72e "[modula2] Variable analysis understands DISPOSE and NIL" from
today.

I'm attaching the output of running with "-v -save-temps -freport-bug", as well
as the corresponding ira.ii.

Tested on Ubuntu 22.04 with:

$ src/gcc/configure \
SHELL=/bin/bash \
--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 \
--disable-mult

[Bug c++/110742] [14 Regression] cc1plus ICE "Floating point exception" during profiled bootstrap since commit 08b99fe8ad6

2023-07-19 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110742

--- Comment #1 from Thiago Jung Bauermann  
---
Created attachment 55584
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55584&action=edit
Preprocessed ira.cc.

[Bug rtl-optimization/113510] New: [ARM Thumb] ICE in extract_constrain_insn with CPU cortex-m23

2024-01-19 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113510

Bug ID: 113510
   Summary: [ARM Thumb] ICE in extract_constrain_insn with CPU
cortex-m23
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thiago.bauermann at linaro dot org
  Target Milestone: ---

Created attachment 57167
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57167&action=edit
Preprocessed version of nested-3.c

After commit a729b6e002fe ("[PR112918][LRA]: Fixing IRA ICE on m68k"), the
following failures started appearing on --target=arm-none-eabi
--with-mode=thumb --with-cpu=cortex-m23:

=== gcc tests ===

Running gcc:gcc.c-torture/compile/compile.exp ...
FAIL: gcc.c-torture/compile/nested-3.c -O2  (internal compiler error: in
extract_constrain_insn, at recog.cc:2713)
FAIL: gcc.c-torture/compile/nested-3.c -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/nested-3.c -O2 -flto -fno-use-linker-plugin
-flto-partition=none  (internal compiler error: in extract_constrain_insn, at
recog.cc:2713)
FAIL: gcc.c-torture/compile/nested-3.c -O2 -flto -fno-use-linker-plugin
-flto-partition=none  (test for excess errors)
FAIL: gcc.c-torture/compile/nested-3.c -O3 -g  (internal compiler error: in
extract_constrain_insn, at recog.cc:2713)
FAIL: gcc.c-torture/compile/nested-3.c -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/nested-3.c -Os  (internal compiler error: in
extract_constrain_insn, at recog.cc:2713)
FAIL: gcc.c-torture/compile/nested-3.c -Os  (test for excess errors)

Running gcc:gcc.c-torture/execute/execute.exp ...
FAIL: gcc.c-torture/execute/pr71494.c -O2  (internal compiler error: in
extract_constrain_insn, at recog.cc:2713)
FAIL: gcc.c-torture/execute/pr71494.c -O2  (test for excess errors)
UNRESOLVED: gcc.c-torture/execute/pr71494.c -O2  compilation failed to produce
executable
FAIL: gcc.c-torture/execute/pr71494.c -O2 -flto -fno-use-linker-plugin
-flto-partition=none  (internal compiler error: in extract_constrain_insn, at
recog.cc:2713)
FAIL: gcc.c-torture/execute/pr71494.c -O2 -flto -fno-use-linker-plugin
-flto-partition=none  (test for excess errors)
UNRESOLVED: gcc.c-torture/execute/pr71494.c -O2 -flto -fno-use-linker-plugin
-flto-partition=none  compilation failed to produce executable
FAIL: gcc.c-torture/execute/pr71494.c -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  (internal compiler error: in extract_constrain_insn, at
recog.cc:2713)
FAIL: gcc.c-torture/execute/pr71494.c -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  (test for excess errors)
UNRESOLVED: gcc.c-torture/execute/pr71494.c -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  compilation failed to produce executable
FAIL: gcc.c-torture/execute/pr71494.c -O3 -g  (internal compiler error: in
extract_constrain_insn, at recog.cc:2713)
FAIL: gcc.c-torture/execute/pr71494.c -O3 -g  (test for excess errors)
UNRESOLVED: gcc.c-torture/execute/pr71494.c -O3 -g  compilation failed to
produce executable
FAIL: gcc.c-torture/execute/pr71494.c -Os  (internal compiler error: in
extract_constrain_insn, at recog.cc:2713)
FAIL: gcc.c-torture/execute/pr71494.c -Os  (test for excess errors)
UNRESOLVED: gcc.c-torture/execute/pr71494.c -Os  compilation failed to produce
executable

I tested on today's trunk (commit 07b392550f37) and the failures are still
present. I'm attaching the gcc.{sum,log} files, and also the .i file that
causes the ICE.

Here's how to reproduce on an x86_64-linux machine:

1. First, create a combined tree:

$ mkdir /tmp/combined-tree-src /tmp/combined-tree-build
$ cd ~/src/newlib-cygwin && find . -print | cpio -pdlm /tmp/combined-tree-src
$ cd ~/src/binutils-gdb && find . -print | cpio -pdlmu /tmp/combined-tree-src
$ cd ~/src/gcc && find . -print | cpio -pdlmu /tmp/combined-tree-src

2. Then build and install the cross GCC:

$ cd /tmp/combined-tree-build
$ /tmp/combined-tree-src/configure \
SHELL=/bin/bash \
--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-m23 \
--with-float=soft \
--with-newlib \
--with-headers=yes \
--with-native-system-header-dir=/include \
--enable-checking=yes \
--disable-bootstrap \
--enable-languages=c,lto \
--prefix=/tmp/arm-none-eabi \
--build=x86_64-pc-linux-gnu \
--host=x86_64-pc-linux-gnu \
   

[Bug rtl-optimization/113510] [ARM Thumb] ICE in extract_constrain_insn with CPU cortex-m23

2024-01-19 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113510

--- Comment #1 from Thiago Jung Bauermann  
---
Created attachment 57168
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57168&action=edit
Preprocessed version of pr71494.c

[Bug rtl-optimization/113510] [ARM Thumb] ICE in extract_constrain_insn with CPU cortex-m23

2024-01-19 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113510

Thiago Jung Bauermann  changed:

   What|Removed |Added

 CC||thiago.bauermann at linaro dot 
org

--- Comment #2 from Thiago Jung Bauermann  
---
Created attachment 57169
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57169&action=edit
Testsuite log from today's trunk with both testcases failing.

I said I was going to send gcc.sum but on second thought, I think gcc.log is
sufficient.

[Bug target/113526] New: [14 Regression ARM] gcc.target/arm/asm-flag-1.c fails since gcc-14-7248-g76bc70387d9

2024-01-20 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113526

Bug ID: 113526
   Summary: [14 Regression ARM] gcc.target/arm/asm-flag-1.c fails
since gcc-14-7248-g76bc70387d9
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thiago.bauermann at linaro dot org
CC: vmakarov at redhat dot com
  Target Milestone: ---
Target: arm-none-eabi

Created attachment 57180
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57180&action=edit
gcc.log showing failures in gcc.target/arm/asm-flag-1.c

After commit 76bc70387d93 ("[PR113354][LRA]: Fixing LRA failure on building
MIPS GCC"), the following failures started appearing on --target=arm-none-eabi:

=== gcc tests ===

Running gcc:gcc.target/arm/arm.exp ...
FAIL: gcc.target/arm/asm-flag-1.c (test for excess errors)
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movcc
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movcs
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler moveq
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movge
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movgt
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movhi
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movle
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movls
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movmi
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movne
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movpl
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movvc
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movvs

The test fails because GCC can't compile asm-flag-1.c anymore:

spawn -ignore SIGHUP /tmp/arm-none-eabi/bin/arm-none-eabi-gcc
/tmp/combined-tree-src/gcc/testsuite/gcc.target/arm/asm-flag-1.c
-fdiagnostics-plain-output -O -ffat-lto-objects -fno-ident -S -o asm-flag-1.s
/tmp/combined-tree-src/gcc/testsuite/gcc.target/arm/asm-flag-1.c: In function
'f':
/tmp/combined-tree-src/gcc/testsuite/gcc.target/arm/asm-flag-1.c:12:3: error:
'asm' operand has impossible constraints or there are not enough registers
compiler exited with status 1
FAIL: gcc.target/arm/asm-flag-1.c (test for excess errors)
Excess errors:
/tmp/combined-tree-src/gcc/testsuite/gcc.target/arm/asm-flag-1.c:12:3: error:
'asm' operand has impossible constraints or there are not enough registers

gcc.target/arm/asm-flag-1.c: output file does not exist
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movne
gcc.target/arm/asm-flag-1.c: output file does not exist
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler moveq
gcc.target/arm/asm-flag-1.c: output file does not exist
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movcs
gcc.target/arm/asm-flag-1.c: output file does not exist
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movcc
gcc.target/arm/asm-flag-1.c: output file does not exist
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movmi
gcc.target/arm/asm-flag-1.c: output file does not exist
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movpl
gcc.target/arm/asm-flag-1.c: output file does not exist
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movvs
gcc.target/arm/asm-flag-1.c: output file does not exist
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movvc
gcc.target/arm/asm-flag-1.c: output file does not exist
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movhi
gcc.target/arm/asm-flag-1.c: output file does not exist
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movls
gcc.target/arm/asm-flag-1.c: output file does not exist
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movge
gcc.target/arm/asm-flag-1.c: output file does not exist
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movls
gcc.target/arm/asm-flag-1.c: output file does not exist
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movgt
gcc.target/arm/asm-flag-1.c: output file does not exist
UNRESOLVED: gcc.target/arm/asm-flag-1.c scan-assembler movle

I tested on today's trunk (commit 036623196777) and the failures are still
present. I'm attaching the gcc.log file.

Here's how to reproduce on an x86_64-linux machine:

1. First, create a combined tree:

$ mkdir /tmp/combined-tree-src /tmp/combined-tree-build
$ cd ~/src/newlib-cygwin && find . -print | cpio -pdlm /tmp/combined-tree-src
$ cd ~/src/binutils-gdb && find . -print | cpio -pdlmu /tmp/combined-tree-src
$ cd ~/src/gcc && find . -print | cpio -pdlmu /tmp/combined-tree-src

2. Then build and install the cross GCC:

$ cd /tmp/combined-tree-build
$ /tmp/combined-tree-src/configure \
SHELL=/bin/bash \
--with-gnu-as \
--with-gnu-ld \
--disable-libmudflap \
--enable-lto \
--enable-shared \
--without-included-gettext \
--enable-nls \
--with-syste

[Bug target/113611] New: [14 Regression] gcc.dg/pr110279-1.c fails on cross build since gcc-14-5779-g746344dd538

2024-01-25 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113611

Bug ID: 113611
   Summary: [14 Regression] gcc.dg/pr110279-1.c fails on cross
build since gcc-14-5779-g746344dd538
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thiago.bauermann at linaro dot org
CC: dizhao at os dot amperecomputing.com
  Target Milestone: ---
Target: arm-linux-gnueabihf

After commit g:746344dd5380 ("swap ops in reassoc to reduce cross backedge
FMA") the following failure started appearing on cross builds of 32 bits Arm:

Running gcc:gcc.dg/dg.exp ...
FAIL: gcc.dg/pr110279-1.c scan-tree-dump-times widening_mul "Generated FMA" 3

We're seeing it with toolchains built with --host=x86_64-linux-gnu and targets
arm-linux-gnueabihf and arm-none-eabi. Both targets with and without
--with-mode=thumb.

Interestingly, with a native compiler (with --host=arm-linux-gnueabihf and
--target=arm-linux-gnueabihf) I can't reproduce the problem.

I tested on today's trunk (commit ffeab69e1ffc) and the failures are still
present.

Here's how to reproduce on an x86_64-linux machine with
--target=arm-linux-gnueabihf:

1. Build and install GCC:

$ ~/src/gcc/configure" \
SHELL=/bin/bash \
--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 \
--disable-multilib \
--with-float=hard \
--with-fpu=vfpv3-d16 \
--with-tune=cortex-a9 \
--with-arch=armv7-a \
--enable-threads=posix \
--enable-multiarch \
--enable-libstdcxx-time=yes \
--enable-gnu-indirect-function \
--with-sysroot=/var/tmp/sysroot-arm-linux-gnueabihf \
--enable-checking=yes \
--disable-bootstrap \
--enable-languages=default \
--prefix=/tmp/arm-linux-gnueabihf \
--build=x86_64-pc-linux-gnu \
--host=x86_64-pc-linux-gnu \
--target=arm-linux-gnueabihf \
&& make \
SHELL=/bin/bash \
-w \
-j $(nproc) \
CFLAGS_FOR_BUILD="-pipe -g -O2" \
CXXFLAGS_FOR_BUILD="-pipe -g -O2" \
LDFLAGS_FOR_BUILD="-static-libgcc" \
MAKEINFOFLAGS=--force \
BUILD_INFO="" \
MAKEINFO=echo \
&& make install

2. Finally, use it to compile the problematic .c file:

$ /tmp/arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc
/home/bauermann/src/gcc/gcc/testsuite/gcc.dg/pr110279-1.c
-fdiagnostics-plain-output -Ofast --param avoid-fma-max-bits=512 --param
tree-reassoc-width=4 -fdump-tree-widening_mul-details -S -o pr110279-1.s
$ grep "Generated FMA" pr110279-1.c.215t.widening_mul || echo FAIL
FAIL

[Bug target/113526] [14 Regression] gcc.target/arm/asm-flag-1.c fails since gcc-14-7248-g76bc70387d9

2024-01-26 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113526

--- Comment #2 from Thiago Jung Bauermann  
---
I verified the fix here.

Thank you!

[Bug target/115253] [14/15 regression] New tests added by r14-10122-gad45086178d833 fail on Cortex M23 and M55 bare metal targets

2024-06-13 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115253

--- Comment #16 from Thiago Jung Bauermann  
---
Thank you!

[Bug target/115373] [15 Regression] RISCV slp-cond-2-big-array.c slp-cond-2.c scan-tree-dump fails since r15-859-geaaa4b88038

2024-06-26 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115373

Thiago Jung Bauermann  changed:

   What|Removed |Added

 CC||thiago.bauermann at linaro dot 
org

--- Comment #4 from Thiago Jung Bauermann  
---
We also see it on arm --with-mode=thumb.

FWIW this is being tracked in the Linaro CI at:

https://linaro.atlassian.net/browse/GNU-1222

[Bug tree-optimization/115157] incorrect TBAA for derived types involving enum types

2024-06-27 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115157

Thiago Jung Bauermann  changed:

   What|Removed |Added

 CC||thiago.bauermann at linaro dot 
org

--- Comment #5 from Thiago Jung Bauermann  
---
FWIW this is being tracked in the Linaro CI at:

https://linaro.atlassian.net/browse/GNU-1224

[Bug target/115707] New: [15 regression] FAIL in gcc.target/aarch64/sve/sad_1.c since gcc-15-863-ga3aeff4ce95b

2024-06-28 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115707

Bug ID: 115707
   Summary: [15 regression] FAIL in gcc.target/aarch64/sve/sad_1.c
since gcc-15-863-ga3aeff4ce95b
   Product: gcc
   Version: 15.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thiago.bauermann at linaro dot org
CC: fxue at os dot amperecomputing.com
  Target Milestone: ---
Target: aarch64

After g:a3aeff4ce95bd616a2108dc2363d9cbaba53b170, gcc-15-863-ga3aeff4ce95b we
have noticed a regression on aarch64-linux-gnu:

Running gcc:gcc.target/aarch64/sve/aarch64-sve.exp ...
gcc.target/aarch64/sve/sad_1.c: \\tudot\\tz[0-9]+\\.d, z[0-9]+\\.h,
z[0-9]+\\.h\\n found 0 times
FAIL: gcc.target/aarch64/sve/sad_1.c scan-assembler-times
\\tudot\\tz[0-9]+\\.d, z[0-9]+\\.h, z[0-9]+\\.h\\n 2

GCC was configured with:

/home/tcwg-buildslave/workspace/tcwg_gnu_3/abe/snapshots/gcc.git~master/configure
\
SHELL=/bin/bash \
   
--with-mpc=/home/tcwg-buildslave/workspace/tcwg_gnu_3/abe/builds/destdir/aarch64-unknown-linux-gnu
\
   
--with-mpfr=/home/tcwg-buildslave/workspace/tcwg_gnu_3/abe/builds/destdir/aarch64-unknown-linux-gnu
\
   
--with-gmp=/home/tcwg-buildslave/workspace/tcwg_gnu_3/abe/builds/destdir/aarch64-unknown-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 \
--disable-multilib \
--enable-fix-cortex-a53-835769 \
--enable-fix-cortex-a53-843419 \
--with-arch=armv8-a \
--enable-threads=posix \
--enable-multiarch \
--enable-libstdcxx-time=yes \
--enable-gnu-indirect-function \
--enable-checking=yes \
--disable-bootstrap \
--enable-languages=default \
   
--prefix=/home/tcwg-buildslave/workspace/tcwg_gnu_3/abe/builds/destdir/aarch64-unknown-linux-gnu

This is being tracked in the Linaro TCWG CI at
https://linaro.atlassian.net/browse/GNU-1226

[Bug target/116010] New: [15 regression] vectorization regressions on arm and aarch64 since r15-491-gc290e6a0b7a9de

2024-07-19 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116010

Bug ID: 116010
   Summary: [15 regression] vectorization regressions on arm and
aarch64 since r15-491-gc290e6a0b7a9de
   Product: gcc
   Version: 15.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: thiago.bauermann at linaro dot org
CC: rguenth at gcc dot gnu.org
  Target Milestone: ---
Target: aarch64, arm

Since commit r15-491-gc290e6a0b7a9de
(g:c290e6a0b7a9de5692963affc6627a4af7dc2411) we see this regression on
aarch64-linux-gnu:

Running gfortran:gfortran.dg/vect/vect.exp ...
gfortran.dg/vect/vect-8.f90   -O  : pattern found 0 times
FAIL: gfortran.dg/vect/vect-8.f90   -O   scan-tree-dump-times vect "vectorized
2[45] loops" 1

And this regression on armv8l-linux-gnueabihf and arm-eabi:

Running gcc:gcc.target/arm/simd/simd.exp ...
gcc.target/arm/simd/mve-vabs.c: memmove found 0 times
FAIL: gcc.target/arm/simd/mve-vabs.c scan-assembler-times memmove 3

Configure options for aarch64-linux-gnu:

/home/tcwg-buildslave/workspace/tcwg_gnu_4/abe/snapshots/gcc.git~master/configure
\
SHELL=/bin/bash \
   
--with-mpc=/home/tcwg-buildslave/workspace/tcwg_gnu_4/abe/builds/destdir/aarch64-unknown-linux-gnu
\
   
--with-mpfr=/home/tcwg-buildslave/workspace/tcwg_gnu_4/abe/builds/destdir/aarch64-unknown-linux-gnu
\
   
--with-gmp=/home/tcwg-buildslave/workspace/tcwg_gnu_4/abe/builds/destdir/aarch64-unknown-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 \
--disable-multilib \
--enable-fix-cortex-a53-835769 \
--enable-fix-cortex-a53-843419 \
--with-arch=armv8-a \
--enable-threads=posix \
--enable-multiarch \
--enable-libstdcxx-time=yes \
--enable-gnu-indirect-function \
--enable-checking=yes \
--disable-bootstrap \
--enable-languages=default \
   
--prefix=/home/tcwg-buildslave/workspace/tcwg_gnu_4/abe/builds/destdir/aarch64-unknown-linux-gnu

Configure options for armv8l-linux-gnueabihf:

/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/armv8l-unknown-linux-gnueabihf
\
   
--with-mpfr=/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/destdir/armv8l-unknown-linux-gnueabihf
\
   
--with-gmp=/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/destdir/armv8l-unknown-linux-gnueabihf
\
--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 \
--disable-multilib \
--with-float=hard \
--with-fpu=neon-fp-armv8 \
--with-mode=thumb \
--with-arch=armv8-a \
--enable-threads=posix \
--enable-multiarch \
--enable-libstdcxx-time=yes \
--enable-gnu-indirect-function \
--enable-checking=yes \
--disable-bootstrap \
--enable-languages=default \
   
--prefix=/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/destdir/armv8l-unknown-linux-gnueabihf

Configure options for arm-eabi:

/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/snapshots/binutils.git~master/configure
\
SHELL=/bin/bash \
--enable-lto \
--enable-plugins \
--enable-gold \
--disable-werror \
CPPFLAGS=-UFORTIFY_SOURCE \
--with-pkgversion=Linaro_Binutils-2024.07.19 \
--disable-gdb \
--disable-gdbserver \
--disable-sim \
--disable-libdecnumber \
--disable-readline \
   
--with-sysroot=/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/destdir/x86_64-pc-linux-gnu/arm-eabi
\
--disable-shared \
--enable-static \
--build=x86_64-pc-linux-gnu \
--host=x86_64-pc-linux-gnu \
--target=arm-eabi \
   
--prefix=/home/tcwg-buildslave/workspace/tcwg_gnu_0/abe/builds/destdir/x86_64-pc-linux-gnu

[Bug testsuite/115140] [15 regression] libgomp.oacc-c++/../libgomp.oacc-c-c++-common/acc_prof-kernels-1.c excess errors after r15-579-ga9251ab3c91c8c

2024-07-19 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115140

Thiago Jung Bauermann  changed:

   What|Removed |Added

 CC||thiago.bauermann at linaro dot 
org

--- Comment #4 from Thiago Jung Bauermann  
---
Also seen on aarch64-linux-gnu and armv8l-linux-gnueabihf.

[Bug target/116010] [15 regression] vectorization regressions on arm and aarch64 since r15-491-gc290e6a0b7a9de

2024-07-22 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116010

--- Comment #3 from Thiago Jung Bauermann  
---
Created attachment 58725
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58725&action=edit
mve-vabs.s generated by the test after commit c290e6a0b7a9.

(In reply to Andrew Pinski from comment #1)
> So I think there are 2 different issues here.

If that is the case, then I can open a separate bugzilla so that there's one
for each test failure.

> First gcc.target/arm/simd/mve-vabs.c now calls memcpy because of the
> restrict instead of memmove. That should be a simple fix there.

In my setup I don't see memcpy being called. Instead of memmove, GCC is now
generating the load and store instruction. E.g.:

 test_vabs_u32x4:   
@ args = 0, pretend = 0, frame = 0  
@ frame_needed = 0, uses_anonymous_args = 0 
-   @ link register save eliminated.
-   movsr2, #16
-   b   memmove
+   push{lr}
+   ldr ip, [r1, #4]@ unaligned
+   ldr lr, [r1]@ unaligned
+   ldr r2, [r1, #8]@ unaligned
+   ldr r3, [r1, #12]   @ unaligned
+   str lr, [r0]@ unaligned
+   str ip, [r0, #4]@ unaligned
+   str r2, [r0, #8]@ unaligned
+   str r3, [r0, #12]   @ unaligned
+   ldr pc, [sp], #4
.size   test_vabs_u32x4, .-test_vabs_u32x4
.align  1
.p2align 2,,3

I'm attaching the complete assembly file for the test.

[Bug target/116010] [15 regression] vectorization regressions on arm and aarch64 since r15-491-gc290e6a0b7a9de

2024-07-22 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116010

--- Comment #4 from Thiago Jung Bauermann  
---
(In reply to Richard Biener from comment #2)
> The gfortran.dg/vect/vect-8.f90 testcase is incredibly bad because it has so
> many loops that are or are not vectorized.  It should ideally be split up.
> 
> But I think the blame is incorrect, the test uses
> -fno-tree-loop-distribute-patterns and thus isn't effected by the rev in
> question.

Today I confirmed the git bisect by reverting commit c290e6a0b7a9 from today's
trunk (commit 88d16194d0c8 at the time of my test), and observing that this
makes gfortran.dg/vect/vect-8.f90 pass again. The commit influences the
testcase somehow.

> As Andrew says the fix for the other regression is trivial, I'm leaving that
> to ARM folks as an exercise.

If that is the case, I will be happy to post a patch to the mailing list.

[Bug target/116010] [15 regression] vectorization regressions on arm and aarch64 since r15-491-gc290e6a0b7a9de

2024-07-22 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116010

--- Comment #6 from Thiago Jung Bauermann  
---
(In reply to Andrew Pinski from comment #5)
> (In reply to Thiago Jung Bauermann from comment #3)
> > > First gcc.target/arm/simd/mve-vabs.c now calls memcpy because of the
> > > restrict instead of memmove. That should be a simple fix there.
> > 
> > In my setup I don't see memcpy being called. Instead of memmove, GCC is now
> > generating the load and store instruction. E.g.:
> 
> Well that is an inlined version of memcpy. I was looking at what was done in
> the tree dump to see the difference.

Ah, thanks for clarifying! So apparently the path forward is to remove the
memmove check from mve-vabs.c. Or is there a way to test inlined memcpy?

[Bug target/116010] [15 regression] vectorization regressions on arm and aarch64 since r15-491-gc290e6a0b7a9de

2024-07-22 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116010

--- Comment #7 from Thiago Jung Bauermann  
---
Created attachment 58729
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58729&action=edit
Testsuite results with/without bisected commit.

Regarding the gfortran.dg/vect/vect-8.f90, I'm attaching a tarball containing
gfortran.log, gfortran.sum, vect-8.s and vect-8.f90.180t.vect of trunk, and
also of trunk with the commit reverted, hoping that it can help.

In trunk, vect-8.f90.180t.vect says "note: vectorized 23 loops in function"
while when the commit is reverted, it says "note: vectorized 24 loops in
function".

[Bug target/116625] [15 regression] regressions on arm-eabi since r15-1619-g3b9b8d6cfdf593

2024-12-04 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116625

--- Comment #5 from Thiago Jung Bauermann  
---
This bug has been fixed by Torbjörn SVENSSON's changes in
r15-4548-ga79ca49b5ce0ad.

[Bug target/116623] [15 regression] regressions on arm-linux-gnueabihf since r15-1619-g3b9b8d6cfdf593

2024-12-04 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116623

--- Comment #2 from Thiago Jung Bauermann  
---
(In reply to GCC Commits from comment #1)
> The master branch has been updated by Torbjorn Svensson :
> 
> https://gcc.gnu.org/g:e152a734337a06ed085c2e6700f21cda9ca7ad17
> 
> commit r15-4966-ge152a734337a06ed085c2e6700f21cda9ca7ad17
> Author: Torbjörn SVENSSON 
> Date:   Sat Oct 19 18:08:01 2024 +0200
> 
> testsuite: arm: Relax register selection [PR116623]

Thank you! I confirmed that the dlstp-compile-asm-2.c failures have been fixed.

I also checked the bfloat16_scalar_*.c failures, and they're still present.

[Bug target/116010] [15 regression] vectorization regressions on arm and aarch64 since r15-491-gc290e6a0b7a9de

2025-02-02 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116010

--- Comment #13 from Thiago Jung Bauermann  
---
(In reply to rguent...@suse.de from comment #12)
> On Wed, 29 Jan 2025, thiago.bauermann at linaro dot org wrote:
> 
> > But unfortunately the gcc.target/arm/simd/mve-vabs.c failure on
> > armv8l-linux-gnueabihf and arm-eabi is still present.
> > 
> > Should I open a separate bugzilla for it?
> 
> Please - from a quick look this looks unrelated, possibly just requiring
> scan-assembler-times adjustments (I never know how to test this MVE stuff
> myself)

Rather than opening a new bugzilla, I submitted a patch to fix the testcase:

https://inbox.sourceware.org/gcc-patches/20250202201825.1601025-1-thiago.bauerm...@linaro.org/

[Bug target/118597] [15 Regression] gcc.dg/vect/vect-fncall-mask.c fails

2025-01-22 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118597

Thiago Jung Bauermann  changed:

   What|Removed |Added

 CC||thiago.bauermann at linaro dot 
org

--- Comment #1 from Thiago Jung Bauermann  
---
Our CI bisected it to commit r15-6945-gea1deefe54ea1c .

https://linaro.atlassian.net/browse/GNU-1503

It also detected that spec2k6 433.milc with -Os increased in size by 4% from
98540 to 102636 bytes.

[Bug target/118597] [15 Regression] gcc.dg/vect/vect-fncall-mask.c fails

2025-01-22 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118597

--- Comment #2 from Thiago Jung Bauermann  
---
(Thanks Christophe Lyon for pointing out this bugzilla to me).

[Bug target/116010] [15 regression] vectorization regressions on arm and aarch64 since r15-491-gc290e6a0b7a9de

2025-01-29 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116010

--- Comment #11 from Thiago Jung Bauermann  
---
(In reply to Richard Biener from comment #10)
> Should be fixed.

Thanks! I can confirm that the gfortran.dg/vect/vect-8.f90 failure has been
fixed on aarch64-linux-gnu.

But unfortunately the gcc.target/arm/simd/mve-vabs.c failure on
armv8l-linux-gnueabihf and arm-eabi is still present.

Should I open a separate bugzilla for it?

[Bug target/116623] [15 regression] regressions on arm-linux-gnueabihf since r15-1619-g3b9b8d6cfdf593

2025-02-19 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116623

--- Comment #3 from Thiago Jung Bauermann  
---
(In reply to Thiago Jung Bauermann from comment #2)
> I also checked the bfloat16_scalar_*.c failures, and they're still present.

I checked again today and now the bfloat16_scalar_*.c failures are fixed.
This bug can be closed.

[Bug target/116623] [15 regression] regressions on arm-linux-gnueabihf since r15-1619-g3b9b8d6cfdf593

2025-02-19 Thread thiago.bauermann at linaro dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116623

Thiago Jung Bauermann  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED

--- Comment #4 from Thiago Jung Bauermann  
---
I hadn't realise I could close (or rather resolve) it myself. Doing it now.