Results for 15.0.0 20240504 (experimental) [master revision gcc-15-141-g3e3d115c946] (GCC) testsuite on arm-unknown-eabi

2024-05-03 Thread ci_notify--- via Gcc-testresults
# From 
https://ci.linaro.org/job/tcwg_gnu_embed_check_gcc--master-thumb_v8a_hard_eabi-build/413/:
LAST_UPDATED: 2024-05-04T04:57:41+00:00 (master revision 
gcc-15-141-g3e3d115c946) arm-eabi 
{-mthumb/-march=armv8-a+simd/-mfpu=auto/-mfloat-abi=hard}

Target is arm-unknown-eabi
Host   is arm-unknown-eabi

=== libstdc++ tests ===


Running target qemu/-mthumb/-march=armv8-a+simd/-mfpu=auto/-mfloat-abi=hard
FAIL: 19_diagnostics/stacktrace/current.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/current.cc  -std=gnu++26 execution test
FAIL: 19_diagnostics/stacktrace/entry.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/entry.cc  -std=gnu++26 execution test
FAIL: 19_diagnostics/stacktrace/output.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/output.cc  -std=gnu++26 execution test
FAIL: 19_diagnostics/stacktrace/stacktrace.cc  -std=gnu++23 execution test
FAIL: 19_diagnostics/stacktrace/stacktrace.cc  -std=gnu++26 execution test
FAIL: 22_locale/ctype/scan/wchar_t/1.cc  -std=gnu++17 execution test
FAIL: 27_io/basic_filebuf/underflow/wchar_t/11603.cc  -std=gnu++17 execution 
test
FAIL: 27_io/basic_fstream/53984.cc  -std=gnu++17 execution test
FAIL: 27_io/print/2.cc  -std=gnu++23 (test for excess errors)
UNRESOLVED: 27_io/print/2.cc  -std=gnu++23 compilation failed to produce 
executable
FAIL: 27_io/print/2.cc  -std=gnu++26 (test for excess errors)
UNRESOLVED: 27_io/print/2.cc  -std=gnu++26 compilation failed to produce 
executable
FAIL: 29_atomics/atomic_float/compare_exchange_padding.cc  -std=gnu++20 (test 
for excess errors)
UNRESOLVED: 29_atomics/atomic_float/compare_exchange_padding.cc  -std=gnu++20 
compilation failed to produce executable
FAIL: 29_atomics/atomic_float/compare_exchange_padding.cc  -std=gnu++26 (test 
for excess errors)
UNRESOLVED: 29_atomics/atomic_float/compare_exchange_padding.cc  -std=gnu++26 
compilation failed to produce executable
FAIL: experimental/simd/pr109261_constexpr_simd.cc -ffast-math -O2 -Wno-psabi 
(test for excess errors)
XPASS: ext/stdio_filebuf/char/10063-2.cc  -std=gnu++17 execution test
XPASS: ext/stdio_filebuf/char/10063-3.cc  -std=gnu++17 execution test

=== libstdc++ Summary ===

# of expected passes15939
# of unexpected failures16
# of unexpected successes   2
# of expected failures  131
# of unresolved testcases   4
# of unsupported tests  1025
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target qemu/-mthumb/-march=armv8-a+simd/-mfpu=auto/-mfloat-abi=hard
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c (test for excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c 2 blank line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c expected multiline 
pattern lines 49-64
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c (test for excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c 2 blank line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c expected multiline 
pattern lines 19-34
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-10.c (test for excess errors)
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-10.c 2 blank line(s) in output
FAIL: gcc.dg/analyzer/out-of-bounds-diagram-10.c expected multiline pattern 
lines 13-28
XPASS: gcc.dg/Wstringop-overflow-47.c pr97027 (test for warnings, line 72)
XPASS: gcc.dg/Wstringop-overflow-47.c pr97027 (test for warnings, line 77)
XPASS: gcc.dg/Wstringop-overflow-47.c pr97027 note (test for warnings, line 68)
FAIL: gcc.dg/fold-copysign-1.c scan-tree-dump-times cddce1 "= ABS_EXPR" 1
FAIL: gcc.dg/fold-copysign-1.c scan-tree-dump-times cddce1 "__builtin_copysign" 
1
FAIL: gcc.dg/pr55152-2.c scan-tree-dump-times optimized ".COPYSIGN" 1
FAIL: gcc.dg/pr55152-2.c scan-tree-dump-times optimized "ABS_EXPR" 1
FAIL: gcc.dg/ipa/ipa-icf-38.c scan-ltrans-tree-dump-not optimized "Function bar"
FAIL: gcc.dg/ipa/ipa-icf-38.c scan-wpa-ipa-dump icf "Equal symbols: 1"
FAIL: gcc.dg/ipa/ipa-icf-38.c scan-wpa-ipa-dump icf "Semantic equality 
hit:foo/[0-9+]+->bar/[0-9+]+"
FAIL: gcc.dg/plugin/must-tail-call-1.c -fplugin=./must_tail_call_plugin.so 
(internal compiler error: in df_refs_verify, at df-scan.cc:4019)
FAIL: gcc.dg/plugin/must-tail-call-1.c -fplugin=./must_tail_call_plugin.so 
(test for excess errors)
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
FAIL: gcc.dg/tree-ssa/abs-4.c scan-tree-dump-times optimized "= -" 1
FAIL: gcc.dg/tree-ssa/abs-4.c scan-tree-dump-times optimized "= .COPYSIGN" 2
FAIL: gcc.dg/tree-ssa/abs-4.c scan-tree-dump-times optimized "= ABS_EXPR" 1
FAIL: gcc.dg/tree-ssa/backprop-6.c scan-tree-dump-times backprop 
"Deleting[^n]* = -" 4
FAIL: gcc.dg/tree-ssa/backprop-6.c scan-tree-dump-times backprop 
"Deleting[^n]* = ABS_EXPR <" 1
FAIL: gcc.dg/tree-ssa/backprop-6.c 

Results for 15.0.0 20240504 (experimental) [remotes/origin/HEAD r15-141-g3e3d115c94] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-05-03 Thread Bill Seurer (POWER9 IEEE128) via Gcc-testresults


git commit g:3e3d115c946944c81d8231dfbe778d4dae26cbb7
gcc-descr r15-141-g3e3d115c946944

power9 IEEE128
Linux 6.9.0-0.rc6.52.fc41.ppc64le ppc64le
GNU Make 4.4.1

DejaGnu:
DejaGnu version 1.6.3
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Sat May  4 04:08:18 UTC 2024 (revision r15-141-g3e3d115c94)

Native configuration is powerpc64le-unknown-linux-gnu

=== gcc tests ===


Running target unix
XPASS: gcc.dg/Wtrampolines.c standard descriptors (test for warnings, line 32)
XPASS: gcc.dg/guality/example.c   -O0  execution test
XPASS: gcc.dg/guality/example.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/example.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O0  execution test
XPASS: gcc.dg/guality/guality.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -Os  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/inline-params.c   -O2  -DPREVENT_OPTIMIZATION  execution 
test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O3 -g  -DPREVENT_OPTIMIZATION  
execution test
XPASS: gcc.dg/guality/inline-params.c   -Os  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/loop-1.c   -O2  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 y == 2
FAIL: gcc.dg/guality/pr36728-3.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr36728-3.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 y == 
2
FAIL: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 i == 37
FAIL: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 i1 == 2 * 
37
FAIL: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 i2 == 3 * 
37
XPASS: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 j == 28 
+ 37
FAIL: gcc.dg/guality/pr54200.c   -O1  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -O2  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -Os  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 y == 25
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 z == 6
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 23 y == 117
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 23 z == 8
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 y == 25
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 z == 6
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 23 y == 117
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 23 z == 8
FAIL: gcc.dg/guality/pr54519-2.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 17 y == 25
FAIL: gcc.dg/guality/pr54519-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 17 y == 25
FAIL: gcc.dg/guality/pr54519-3.c   -O2 -flto -fno-use-linker-plugin 

Results for 12.3.1 20240504 [remotes/origin/releases/gcc-12 r12-10412-g1e5d35c963] (GCC) testsuite on powerpc64-unknown-linux-gnu

2024-05-03 Thread Bill Seurer (POWER9 BE) via Gcc-testresults


git commit g:1e5d35c963e550719567a3ac1c76eafff58079fd
gcc-descr r12-10412-g1e5d35c963e550

power9 BE
Linux 6.7.12-powerpc64 ppc64
GNU Make 4.3

DejaGnu:
DejaGnu version 1.6.3
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Sat May  4 03:52:56 UTC 2024 (revision r12-10412-g1e5d35c963)

Native configuration is powerpc64-unknown-linux-gnu

=== g++ tests ===


Running target unix/-m32

=== g++ Summary for unix/-m32 ===

# of expected passes219472
# of expected failures  1922
# of unsupported tests  10356

Running target unix/-m64

=== g++ Summary for unix/-m64 ===

# of expected passes228217
# of expected failures  1930
# of unsupported tests  10540

=== g++ Summary ===

# of expected passes447689
# of expected failures  3852
# of unsupported tests  20896
/home/gccbuild/build/nightly/build-gcc-12/gcc/xg++  version 12.3.1 20240504 
[remotes/origin/releases/gcc-12 r12-10412-g1e5d35c963] (GCC) 

=== gcc tests ===


Running target unix/-m32
XPASS: gcc.dg/uninit-pred-7_a.c bogus warning (test for bogus messages, line 26)
FAIL: gcc.dg/torture/pr52451.c   -O0  execution test
FAIL: gcc.dg/torture/pr52451.c   -O1  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2  execution test
FAIL: gcc.dg/torture/pr52451.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr52451.c   -Os  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr91323.c   -O0  execution test
FAIL: gcc.dg/torture/pr91323.c   -O1  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2  execution test
FAIL: gcc.dg/torture/pr91323.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr91323.c   -Os  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
XPASS: gcc.dg/vect/slp-24-big-array.c scan-tree-dump-times vect "vectorized 1 
loops" 1
XPASS: gcc.dg/vect/slp-24-big-array.c scan-tree-dump-times vect "vectorizing 
stmts using SLP" 2
XPASS: gcc.dg/vect/slp-24-big-array.c -flto -ffat-lto-objects  
scan-tree-dump-times vect "vectorized 1 loops" 1
XPASS: gcc.dg/vect/slp-24-big-array.c -flto -ffat-lto-objects  
scan-tree-dump-times vect "vectorizing stmts using SLP" 2
XPASS: gcc.dg/vect/slp-24.c scan-tree-dump-times vect "vectorized 1 loops" 1
XPASS: gcc.dg/vect/slp-24.c scan-tree-dump-times vect "vectorizing stmts using 
SLP" 2
XPASS: gcc.dg/vect/slp-24.c -flto -ffat-lto-objects  scan-tree-dump-times vect 
"vectorized 1 loops" 1
XPASS: gcc.dg/vect/slp-24.c -flto -ffat-lto-objects  scan-tree-dump-times vect 
"vectorizing stmts using SLP" 2
FAIL: gcc.target/powerpc/bfp/scalar-test-data-class-12.c (test for excess 
errors)
UNRESOLVED: gcc.target/powerpc/bfp/scalar-test-data-class-12.c compilation 
failed to produce executable
FAIL: gcc.target/powerpc/bfp/scalar-test-data-class-14.c (test for excess 
errors)
UNRESOLVED: gcc.target/powerpc/bfp/scalar-test-data-class-14.c compilation 
failed to produce executable
FAIL: gcc.target/powerpc/bfp/scalar-test-data-class-15.c (test for excess 
errors)
UNRESOLVED: gcc.target/powerpc/bfp/scalar-test-data-class-15.c compilation 
failed to produce executable
FAIL: gcc.target/powerpc/bfp/scalar-test-neg-8.c (test for excess errors)
UNRESOLVED: gcc.target/powerpc/bfp/scalar-test-neg-8.c compilation failed to 
produce executable
FAIL: gcc.target/powerpc/bfp/vec-test-data-class-9.c (test for excess errors)
UNRESOLVED: gcc.target/powerpc/bfp/vec-test-data-class-9.c compilation failed 
to produce executable
FAIL: gcc.target/powerpc/fold-vec-extract-char.p7.c scan-assembler-times 
maddiM 9
FAIL: gcc.target/powerpc/fold-vec-extract-double.p7.c scan-assembler-times 
maddiM|maddM 3
FAIL: gcc.target/powerpc/fold-vec-extract-float.p7.c scan-assembler-times 
maddiM|maddM 3
FAIL: gcc.target/powerpc/fold-vec-extract-float.p8.c scan-assembler-times 
maddiM 2
FAIL: gcc.target/powerpc/fold-vec-extract-int.p7.c scan-assembler-times 
maddiM|maddM 12
FAIL: gcc.target/powerpc/fold-vec-extract-int.p8.c scan-assembler-times 
maddiM 9
FAIL: gcc.target/powerpc/fold-vec-extract-short.p7.c scan-assembler-times 
maddiM|maddM 12
FAIL: gcc.target/powerpc/fold-vec-extract-short.p8.c scan-assembler-times 
maddiM 9
FAIL: gcc.target/powerpc/pr101384-2.c scan-assembler-times mvspltis[whb] 
[^nr]*,-1M 9
FAIL: gcc.target/powerpc/rs6000-fpint.c scan-assembler-not stfiwx
XPASS: gcc.target/powerpc/ppc-fortran/ieee128-math.f90   -O  (test for excess 
errors)

=== gcc Summary for unix/-m32 ===

# of 

Results for 11.4.1 20240504 [releases/gcc-11 revision f7bcc355d0:6df48ede21:bfb79239bfca6b1aa6be3721c32b70a9aeb91b44] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-05-03 Thread Bill Seurer (POWER8) via Gcc-testresults


git commit g:bfb79239bfca6b1aa6be3721c32b70a9aeb91b44
gcc-descr r11-11415-gbfb79239bfca6b

power8
Linux 5.4.0-177-generic ppc64le
GNU Make 4.2.1

DejaGnu:
DejaGnu version 1.6.2
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Sat May  4 03:01:38 UTC 2024 (revision 
f7bcc355d0:6df48ede21:bfb79239bfca6b1aa6be3721c32b70a9aeb91b44)

Native configuration is powerpc64le-unknown-linux-gnu

=== gcc tests ===


Running target unix
FAIL: c-c++-common/attr-retain-6.c  -Wc++-compat   (test for warnings, line 21)
FAIL: c-c++-common/attr-retain-6.c  -Wc++-compat   scan-assembler 
__libc_freeres_fn,"ax"
FAIL: c-c++-common/attr-retain-7.c  -Wc++-compat   (test for warnings, line 6)
FAIL: c-c++-common/attr-retain-7.c  -Wc++-compat   scan-assembler 
.data.foo,"awR"
FAIL: c-c++-common/attr-retain-8.c  -Wc++-compat   (test for warnings, line 5)
FAIL: c-c++-common/attr-retain-8.c  -Wc++-compat   scan-assembler .data.foo,"aw"
XPASS: gcc.dg/Wtrampolines.c standard descriptors (test for warnings, line 29)
XPASS: gcc.dg/graphite/pr69728.c scan-tree-dump graphite "loop nest optimized"
XPASS: gcc.dg/guality/example.c   -O0  execution test
XPASS: gcc.dg/guality/example.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/example.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O0  execution test
XPASS: gcc.dg/guality/guality.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c  -Og -DPREVENT_OPTIMIZATION  execution test
FAIL: gcc.dg/guality/inline-params-2.c   -O2  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/inline-params-2.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/inline-params-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/inline-params-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  
execution test
FAIL: gcc.dg/guality/inline-params-2.c   -Os  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/loop-1.c   -O2  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 y == 2
FAIL: gcc.dg/guality/pr36728-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 18 y == 
2
FAIL: gcc.dg/guality/pr36728-3.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr36728-3.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 y == 
2
XPASS: gcc.dg/guality/pr41353-1.c   -O0  line 28 j == 28 + 37
FAIL: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 i == 37
FAIL: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 i1 == 2 * 
37
FAIL: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 i2 == 3 * 
37
XPASS: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 j == 28 
+ 37
FAIL: gcc.dg/guality/pr41447-1.c   -O2  -DPREVENT_OPTIMIZATION  execution test
FAIL: gcc.dg/guality/pr41447-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/pr41447-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/pr41447-1.c   -Os  -DPREVENT_OPTIMIZATION  execution test
FAIL: gcc.dg/guality/pr41616-1.c   -O2  -DPREVENT_OPTIMIZATION  execution test
FAIL: gcc.dg/guality/pr41616-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/pr41616-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/pr41616-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/pr43051-1.c   -O1  -DPREVENT_OPTIMIZATION  line 35 v == 1
FAIL: gcc.dg/guality/pr43051-1.c   -O1  -DPREVENT_OPTIMIZATION  line 40 v == 1
FAIL: gcc.dg/guality/pr43051-1.c   -O2  -DPREVENT_OPTIMIZATION  line 35 v == 1
FAIL: gcc.dg/guality/pr43051-1.c   -O2  -DPREVENT_OPTIMIZATION  line 40 v == 1
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 35 v == 1
FAIL: 

Results for 12.3.1 20240504 [releases/gcc-12 r12-10412-g1e5d35c963] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-05-03 Thread Bill Seurer (POWER9 IEEE128) via Gcc-testresults


git commit g:1e5d35c963e550719567a3ac1c76eafff58079fd
gcc-descr r12-10412-g1e5d35c963e550

power9 IEEE128
Linux 6.9.0-0.rc6.52.fc41.ppc64le ppc64le
GNU Make 4.4.1

DejaGnu:
DejaGnu version 1.6.3
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Sat May  4 02:56:35 UTC 2024 (revision r12-10412-g1e5d35c963)

Native configuration is powerpc64le-unknown-linux-gnu

=== gcc tests ===


Running target unix
FAIL: gcc.dg/analyzer/data-model-4.c (test for excess errors)
FAIL: gcc.dg/analyzer/torture/conftest-1.c   -O0  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/conftest-1.c   -O1  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/conftest-1.c   -O2  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/conftest-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/conftest-1.c   -O3 -g  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/conftest-1.c   -Os  (test for excess errors)
XPASS: gcc.dg/Wtrampolines.c standard descriptors (test for warnings, line 29)
FAIL: gcc.dg/split-1.c (test for excess errors)
UNRESOLVED: gcc.dg/split-1.c compilation failed to produce executable
FAIL: gcc.dg/split-2.c (test for excess errors)
UNRESOLVED: gcc.dg/split-2.c compilation failed to produce executable
FAIL: gcc.dg/split-3.c (test for excess errors)
UNRESOLVED: gcc.dg/split-3.c compilation failed to produce executable
FAIL: gcc.dg/split-4.c (test for excess errors)
UNRESOLVED: gcc.dg/split-4.c compilation failed to produce executable
FAIL: gcc.dg/split-5.c (test for excess errors)
UNRESOLVED: gcc.dg/split-5.c compilation failed to produce executable
FAIL: gcc.dg/split-6.c (test for excess errors)
UNRESOLVED: gcc.dg/split-6.c compilation failed to produce executable
FAIL: gcc.dg/split-7.c (test for excess errors)
UNRESOLVED: gcc.dg/split-7.c compilation failed to produce executable
FAIL: gcc.dg/split-8.c (test for excess errors)
UNRESOLVED: gcc.dg/split-8.c compilation failed to produce executable
XPASS: gcc.dg/uninit-pred-7_a.c bogus warning (test for bogus messages, line 26)
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O0  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O1  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O2  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O3 -g  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -Os  execution test
FAIL: gcc.dg/torture/float128-nan.c   -O0  execution test
FAIL: gcc.dg/torture/float128-nan.c   -O1  execution test
FAIL: gcc.dg/torture/float128-nan.c   -O2  execution test
FAIL: gcc.dg/torture/float128-nan.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/float128-nan.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/float128-nan.c   -O3 -g  execution test
FAIL: gcc.dg/torture/float128-nan.c   -Os  execution test
FAIL: gcc.dg/torture/pr52451.c   -O0  execution test
FAIL: gcc.dg/torture/pr52451.c   -O1  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr52451.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr52451.c   -Os  execution test
FAIL: gcc.dg/torture/pr91323.c   -O0  execution test
FAIL: gcc.dg/torture/pr91323.c   -O1  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr91323.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr91323.c   -Os  execution test
FAIL: gcc.dg/tree-prof/split-1.c compilation,  -fprofile-generate 
-D_PROFILE_GENERATE
UNRESOLVED: gcc.dg/tree-prof/split-1.c compilation,  -fprofile-use 
-D_PROFILE_USE
UNRESOLVED: gcc.dg/tree-prof/split-1.c execution,-fprofile-generate 
-D_PROFILE_GENERATE
UNRESOLVED: gcc.dg/tree-prof/split-1.c execution,-fprofile-use 
-D_PROFILE_USE
XPASS: gcc.dg/tree-ssa/ssa-dom-cse-2.c scan-tree-dump optimized "return 28;"
FAIL: gcc.target/powerpc/nan128-1.c execution test
FAIL: gcc.target/powerpc/pr105334.c (test for excess errors)
FAIL: gcc.target/powerpc/pr56605.c scan-rtl-dump-times combine "(compare:CC 
((?:and|zero_extend):(?:[SD]I) ((?:sub)?reg:[SD]I" 1
FAIL: gcc.target/powerpc/rlwimi-2.c scan-assembler-times (?n)^s+[a-z] 20217
FAIL: gcc.target/powerpc/rs6000-fpint.c scan-assembler-not stfiwx
XPASS: 

Results for 15.0.0 20240503 (experimental) [master r15-133-g467ca4a195e] (GCC) testsuite on s390x-ibm-linux-gnu arch14

2024-05-03 Thread stefansf--- via Gcc-testresults
LAST_UPDATED: Fri May  3 17:05:30 UTC 2024 (revision r15-133-g467ca4a195e)

=== acats tests ===
FAIL:   cb1010a

=== acats Summary ===
# of expected passes2327
# of unexpected failures1
Native configuration is s390x-ibm-linux-gnu arch14

=== gcc tests ===


Running target unix/-m31
FAIL: gcc.c-torture/execute/920501-4.c   -O1  execution test
FAIL: gcc.c-torture/execute/920501-4.c   -O2  execution test
FAIL: gcc.c-torture/execute/920501-4.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.c-torture/execute/920501-4.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.c-torture/execute/920501-4.c   -O3 -g  execution test
FAIL: gcc.c-torture/execute/920501-4.c   -Os  execution test
FAIL: gcc.c-torture/execute/920501-5.c   -O1  execution test
FAIL: gcc.c-torture/execute/920501-5.c   -O2  execution test
FAIL: gcc.c-torture/execute/920501-5.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.c-torture/execute/920501-5.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.c-torture/execute/920501-5.c   -O3 -g  execution test
FAIL: gcc.c-torture/execute/920501-5.c   -Os  execution test
FAIL: gcc.c-torture/execute/920721-4.c   -O2  execution test
FAIL: gcc.c-torture/execute/920721-4.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.c-torture/execute/920721-4.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.c-torture/execute/920721-4.c   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: gcc.c-torture/execute/920721-4.c   -O3 -g  execution test
FAIL: gcc.c-torture/execute/920721-4.c   -Os  execution test
FAIL: c-c++-common/asan/pointer-compare-1.c   -O0  output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c   -O1  output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c   -O2  output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c   -O3 -g  output pattern test
FAIL: c-c++-common/asan/pointer-compare-1.c   -Os  output pattern test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -O0  execution test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -O1  execution test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -O2  execution test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -O3 -g  execution test
FAIL: c-c++-common/asan/pointer-subtract-3.c   -Os  execution test
FAIL: c-c++-common/asan/pr64820.c   -O0  output pattern test
FAIL: c-c++-common/asan/pr64820.c   -O1  output pattern test
FAIL: c-c++-common/asan/pr64820.c   -O2  output pattern test
FAIL: c-c++-common/asan/pr64820.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  output pattern test
FAIL: c-c++-common/asan/pr64820.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  output pattern test
FAIL: c-c++-common/asan/pr64820.c   -O3 -g  output pattern test
FAIL: c-c++-common/asan/pr64820.c   -Os  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -O0  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -O1  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -O2  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -O3 -g  output pattern test
FAIL: c-c++-common/asan/use-after-return-1.c   -Os  output pattern test
FAIL: c-c++-common/vector-subscript-4.c  -Wc++-compat   scan-tree-dump-not 
optimized "vector"
FAIL: gcc.dg/auto-init-uninit-17.c unconditional (test for warnings, line 14)
FAIL: gcc.dg/gcc-have-sync-compare-and-swap.c (test for excess errors)
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "Decided"
FAIL: gcc.dg/loop-9.c scan-rtl-dump loop2_invariant "without introducing a new 
temporary register"
FAIL: gcc.dg/lower-subreg-1.c scan-rtl-dump subreg1 "Splitting reg"
FAIL: gcc.dg/sms-compare-debug-1.c (test for excess errors)
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "MEM 
 [.*]" 1
FAIL: gcc.dg/uninit-17.c unconditional (test for warnings, line 14)
FAIL: c-c++-common/goacc/firstprivate-mappings-1.c scan-tree-dump omplower 
"(?n)#pragma omp target oacc_parallel map(from:array_so [len: 
4]) 

Results for 13.2.1 20240504 [releases/gcc-13 r13-8685-g2bb5a67d60] (GCC) testsuite on powerpc64-unknown-linux-gnu

2024-05-03 Thread Bill Seurer (POWER9 BE) via Gcc-testresults


git commit g:2bb5a67d607de1eed56df0c889fdc9dc8d57fff8
gcc-descr r13-8685-g2bb5a67d607de1

power9 BE
Linux 6.7.12-powerpc64 ppc64
GNU Make 4.3

DejaGnu:
DejaGnu version 1.6.3
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Sat May  4 02:16:33 UTC 2024 (revision r13-8685-g2bb5a67d60)

Native configuration is powerpc64-unknown-linux-gnu

=== g++ tests ===


Running target unix/-m32
FAIL: g++.dg/modules/xtreme-header-5_c.C -std=c++2a (test for excess errors)
FAIL: g++.dg/modules/xtreme-header-5_c.C -std=c++2b (test for excess errors)

=== g++ Summary for unix/-m32 ===

# of expected passes226068
# of unexpected failures2
# of expected failures  1929
# of unsupported tests  10893

Running target unix/-m64

=== g++ Summary for unix/-m64 ===

# of expected passes235012
# of expected failures  1937
# of unsupported tests  11081

=== g++ Summary ===

# of expected passes461080
# of unexpected failures2
# of expected failures  3866
# of unsupported tests  21974
/home/gccbuild/build/nightly/build-gcc-13/gcc/xg++  version 13.2.1 20240504 
[releases/gcc-13 r13-8685-g2bb5a67d60] (GCC) 

=== gcc tests ===


Running target unix/-m32
XPASS: gcc.dg/guality/example.c   -O0  execution test
XPASS: gcc.dg/guality/example.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/example.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O0  execution test
XPASS: gcc.dg/guality/guality.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -Os  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/inline-params.c   -O2  -DPREVENT_OPTIMIZATION  execution 
test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O3 -g  -DPREVENT_OPTIMIZATION  
execution test
XPASS: gcc.dg/guality/inline-params.c   -Os  -DPREVENT_OPTIMIZATION  execution 
test
XPASS: gcc.dg/guality/ipa-sra-1.c   -O0  line 15 k == 3
XPASS: gcc.dg/guality/ipa-sra-1.c   -O1  -DPREVENT_OPTIMIZATION  line 15 k == 3
XPASS: gcc.dg/guality/ipa-sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 15 k == 3
FAIL: gcc.dg/guality/loop-1.c   -O2  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 y == 2
FAIL: gcc.dg/guality/pr36728-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 18 y == 
2
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg1 == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg2 == 2
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg3 == 3
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg4 == 4
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg5 == 5
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg6 == 6
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg7 == 30
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg1 == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg2 == 2
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 

Results for 15.0.0 20240504 (experimental) [remotes/origin/HEAD r15-141-g3e3d115c94] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-05-03 Thread Bill Seurer (POWER8) via Gcc-testresults


git commit g:3e3d115c946944c81d8231dfbe778d4dae26cbb7
gcc-descr r15-141-g3e3d115c946944

power8
Linux 5.4.0-177-generic ppc64le
GNU Make 4.2.1

DejaGnu:
DejaGnu version 1.6.2
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Sat May  4 01:02:56 UTC 2024 (revision r15-141-g3e3d115c94)

Native configuration is powerpc64le-unknown-linux-gnu

=== gcc tests ===


Running target unix
XPASS: gcc.dg/Wtrampolines.c standard descriptors (test for warnings, line 32)
XPASS: gcc.dg/guality/example.c   -O0  execution test
XPASS: gcc.dg/guality/example.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/example.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O0  execution test
XPASS: gcc.dg/guality/guality.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c  -Og -DPREVENT_OPTIMIZATION  execution test
FAIL: gcc.dg/guality/inline-params-2.c   -O2  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/inline-params-2.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/inline-params-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/inline-params-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  
execution test
FAIL: gcc.dg/guality/inline-params-2.c   -Os  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/loop-1.c   -O2  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 *x == (char) 25
FAIL: gcc.dg/guality/pr36728-3.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr36728-3.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 y == 
2
FAIL: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 i == 37
FAIL: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 i1 == 2 * 
37
FAIL: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 i2 == 3 * 
37
XPASS: gcc.dg/guality/pr41353-1.c  -Og -DPREVENT_OPTIMIZATION  line 28 j == 28 
+ 37
FAIL: gcc.dg/guality/pr41447-1.c   -O2  -DPREVENT_OPTIMIZATION  execution test
FAIL: gcc.dg/guality/pr41447-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/pr41447-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/pr41447-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/pr41447-1.c   -Os  -DPREVENT_OPTIMIZATION  execution test
FAIL: gcc.dg/guality/pr41616-1.c   -O2  -DPREVENT_OPTIMIZATION  execution test
FAIL: gcc.dg/guality/pr41616-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/pr41616-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
FAIL: gcc.dg/guality/pr41616-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/pr54200.c   -O1  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -O2  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54200.c   -Os  -DPREVENT_OPTIMIZATION  line 20 z == 3
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 y == 25
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 z == 6
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 23 y == 117
FAIL: gcc.dg/guality/pr54519-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 23 z == 8
FAIL: gcc.dg/guality/pr54519-2.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 17 y == 25
FAIL: 

Results for 13.2.1 20240504 [releases/gcc-13 r13-8685-g2bb5a67d60] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-05-03 Thread Bill Seurer (POWER9 IEEE128) via Gcc-testresults


git commit g:2bb5a67d607de1eed56df0c889fdc9dc8d57fff8
gcc-descr r13-8685-g2bb5a67d607de1

power9 IEEE128
Linux 6.9.0-0.rc6.52.fc41.ppc64le ppc64le
GNU Make 4.4.1

DejaGnu:
DejaGnu version 1.6.3
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Sat May  4 01:47:26 UTC 2024 (revision r13-8685-g2bb5a67d60)

Native configuration is powerpc64le-unknown-linux-gnu

=== gcc tests ===


Running target unix
FAIL: gcc.dg/analyzer/data-model-4.c (test for excess errors)
FAIL: gcc.dg/analyzer/torture/conftest-1.c   -O0  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/conftest-1.c   -O1  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/conftest-1.c   -O2  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/conftest-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/conftest-1.c   -O3 -g  (test for excess errors)
FAIL: gcc.dg/analyzer/torture/conftest-1.c   -Os  (test for excess errors)
XPASS: gcc.dg/Wtrampolines.c standard descriptors (test for warnings, line 29)
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O0  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O1  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O2  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -O3 -g  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -Os  execution test
FAIL: gcc.dg/torture/pr52451.c   -O0  execution test
FAIL: gcc.dg/torture/pr52451.c   -O1  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr52451.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr52451.c   -Os  execution test
FAIL: gcc.dg/torture/pr91323.c   -O0  execution test
FAIL: gcc.dg/torture/pr91323.c   -O1  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr91323.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr91323.c   -Os  execution test
XPASS: gcc.dg/tree-ssa/ssa-dom-cse-2.c scan-tree-dump optimized "return 28;"
FAIL: gcc.target/powerpc/pr105334.c (test for excess errors)
FAIL: gcc.target/powerpc/rlwimi-2.c scan-assembler-times (?n)^s+[a-z] 20217
FAIL: gcc.target/powerpc/rs6000-fpint.c scan-assembler-not stfiwx
XPASS: gcc.target/powerpc/ppc-fortran/ieee128-math.f90   -O  (test for excess 
errors)

=== gcc Summary ===

# of expected passes165847
# of unexpected failures31
# of unexpected successes   3
# of expected failures  1481
# of unsupported tests  2973
/home/gccbuild/build/nightly/build-gcc-13/gcc/xgcc  version 13.2.1 20240504 
[releases/gcc-13 r13-8685-g2bb5a67d60] (GCC) 

=== gfortran tests ===


Running target unix
XPASS: gfortran.dg/default_format_2.f90   -O0  execution test
XPASS: gfortran.dg/default_format_2.f90   -O1  execution test
XPASS: gfortran.dg/default_format_2.f90   -O2  execution test
XPASS: gfortran.dg/default_format_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/default_format_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/default_format_2.f90   -Os  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O0  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O1  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O2  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -Os  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O0  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O1  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O2  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -Os  execution test

=== gfortran Summary ===

# of expected passes68203
# of unexpected successes   18
# of expected failures

Results for 15.0.0 20240504 (experimental) [master r15-141-g3e3d115c94] (GCC) testsuite on powerpc64-unknown-linux-gnu

2024-05-03 Thread Bill Seurer (POWER9 BE) via Gcc-testresults


git commit g:3e3d115c946944c81d8231dfbe778d4dae26cbb7
gcc-descr r15-141-g3e3d115c946944

power9 BE
Linux 6.7.12-powerpc64 ppc64
GNU Make 4.3

DejaGnu:
DejaGnu version 1.6.3
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Sat May  4 00:44:34 UTC 2024 (revision r15-141-g3e3d115c94)

Native configuration is powerpc64-unknown-linux-gnu

=== g++ tests ===


Running target unix/-m32
FAIL: c-c++-common/torture/strub-run3.c   -O0  execution test

=== g++ Summary for unix/-m32 ===

# of expected passes251306
# of unexpected failures1
# of expected failures  2615
# of unsupported tests  11523

Running target unix/-m64

=== g++ Summary for unix/-m64 ===

# of expected passes260320
# of expected failures  2620
# of unsupported tests  11696

=== g++ Summary ===

# of expected passes511626
# of unexpected failures1
# of expected failures  5235
# of unsupported tests  23219
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xg++  version 15.0.0 20240504 
(experimental) [master r15-141-g3e3d115c94] (GCC) 

=== gcc tests ===


Running target unix/-m32
XPASS: gcc.dg/guality/example.c   -O0  execution test
XPASS: gcc.dg/guality/example.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/example.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O0  execution test
XPASS: gcc.dg/guality/guality.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -Os  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/inline-params.c   -O2  -DPREVENT_OPTIMIZATION  execution 
test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O3 -g  -DPREVENT_OPTIMIZATION  
execution test
XPASS: gcc.dg/guality/inline-params.c   -Os  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/loop-1.c   -O2  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg1 == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg2 == 2
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg3 == 3
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg4 == 4
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg5 == 5
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg6 == 6
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg7 == 30
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg1 == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg2 == 2
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg3 == 3
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg4 == 4
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg5 == 5
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg6 == 6
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto 

[Bug c++/114928] #pragma packed(push, 1) should give the same warning as __attribute__((packed))

2024-05-03 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114928

Eric Gallager  changed:

   What|Removed |Added

 CC||egallager at gcc dot gnu.org
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=60972

--- Comment #1 from Eric Gallager  ---
There are a number of other bugs open regarding inconsistencies between #pragma
pack and __attribute__((packed)); see for instance bug 60972 and related bugs
(not sure if this is a dup or even fully related, but it's at least worth
putting under "See Also"...)

[gcc(refs/users/meissner/heads/work165-tar)] Update ChangeLog.*

2024-05-03 Thread Michael Meissner via Gcc-cvs
https://gcc.gnu.org/g:6365a8475fd30393b104753a1e5a7aa85b031605

commit 6365a8475fd30393b104753a1e5a7aa85b031605
Author: Michael Meissner 
Date:   Fri May 3 22:07:15 2024 -0400

Update ChangeLog.*

Diff:
---
 gcc/ChangeLog.tar | 56 ++-
 1 file changed, 55 insertions(+), 1 deletion(-)

diff --git a/gcc/ChangeLog.tar b/gcc/ChangeLog.tar
index 26f27bb12ae..5083f34c4cf 100644
--- a/gcc/ChangeLog.tar
+++ b/gcc/ChangeLog.tar
@@ -1,6 +1,60 @@
+ Branch work165-tar, patch #200 
+
+Add support for -mtar
+
+2024-05-03  Michael Meissner  
+
+gcc/
+
+   * config/rs6000/constraints.md (h constraint): Add tar register to
+   documentation.
+   (wt constraint): New constraint.
+   * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Add -mtar.
+   (POWERPC_MASKS): Likewise.
+   * config/rs6000/rs6000.cc (rs6000_reg_names): Add new tar register.
+   (alt_reg_names): Likewise.
+   (rs6000_debug_reg_global): Likewise.
+   (rs6000_init_hard_regno_mode_ok): Likewise.
+   (rs6000_option_override_internal): Likewise.
+   (rs6000_conditional_register_usage): Likewise.
+   (print_operand): Likewise.
+   (rs6000_debugger_regno): Likewise.
+   (rs6000_opt_masks): Likewise.
+   * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Likewise.
+   (FiXED_REGISTERS): Likewise.
+   (CALL_REALLY_USED_REGISTERS): Likewise.
+   (REG_ALLOC_ORDER): Likewise.
+   (reg_class): Add new TAR_REGS register class.
+   (REG_CLASS_NAMES): Likewise.
+   (REG_CLASS_CONTENTS): Likewise.
+   (r6000_reg_class_enum): Add RS6000_CONSTRAINT_wt.
+   (REG_NAMES): Add tar register.
+   * config/rs6000/rs6000.md (TAR_REGNO): New constant.
+   (mov_internal): Add support for tar register.
+   (movcc_): Likewise.
+   (movsf_hardfloat): Likewise.
+   (movsd_hardfloat): Likewise.
+   (mov_softfloat): Likewise.
+   (mov_hardfloat64): Likewise.
+   (mov_softfloat64): Likewise.
+   (@tablejump_insn_normal); Likewise.
+   (@tablejump_insn_nospec); Likewise.
+   * config/rs6000/rs6000.opt (-mtar): New option.
+   * doc/invoke.texi (RS/6000 options): Document -mtar.
+   * lra-constraints.md (lra_constraints): Print out insn that we can't
+   generate reloads for.
+
  Branch work165-tar, baseline 
 
+Add ChangeLog.tar and update REVISION.
+
+2024-05-02  Michael Meissner  
+
+gcc/
+
+   * ChangeLog.tar: New file for branch.
+   * REVISION: Update.
+
 2024-05-02   Michael Meissner  
 
Clone branch
-


[gcc(refs/users/meissner/heads/work165-tar)] Add support for -mtar

2024-05-03 Thread Michael Meissner via Gcc-cvs
https://gcc.gnu.org/g:70c202710f25f02a52d560b5fa814f0b42d5ad4c

commit 70c202710f25f02a52d560b5fa814f0b42d5ad4c
Author: Michael Meissner 
Date:   Fri May 3 22:04:58 2024 -0400

Add support for -mtar

2024-05-03  Michael Meissner  

gcc/

* config/rs6000/constraints.md (h constraint): Add tar register to
documentation.
(wt constraint): New constraint.
* config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Add -mtar.
(POWERPC_MASKS): Likewise.
* config/rs6000/rs6000.cc (rs6000_reg_names): Add new tar register.
(alt_reg_names): Likewise.
(rs6000_debug_reg_global): Likewise.
(rs6000_init_hard_regno_mode_ok): Likewise.
(rs6000_option_override_internal): Likewise.
(rs6000_conditional_register_usage): Likewise.
(print_operand): Likewise.
(rs6000_debugger_regno): Likewise.
(rs6000_opt_masks): Likewise.
* config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Likewise.
(FiXED_REGISTERS): Likewise.
(CALL_REALLY_USED_REGISTERS): Likewise.
(REG_ALLOC_ORDER): Likewise.
(reg_class): Add new TAR_REGS register class.
(REG_CLASS_NAMES): Likewise.
(REG_CLASS_CONTENTS): Likewise.
(r6000_reg_class_enum): Add RS6000_CONSTRAINT_wt.
(REG_NAMES): Add tar register.
* config/rs6000/rs6000.md (TAR_REGNO): New constant.
(mov_internal): Add support for tar register.
(movcc_): Likewise.
(movsf_hardfloat): Likewise.
(movsd_hardfloat): Likewise.
(mov_softfloat): Likewise.
(mov_hardfloat64): Likewise.
(mov_softfloat64): Likewise.
(@tablejump_insn_normal); Likewise.
(@tablejump_insn_nospec); Likewise.
* config/rs6000/rs6000.opt (-mtar): New option.
* doc/invoke.texi (RS/6000 options): Document -mtar.
* lra-constraints.md (lra_constraints): Print out insn that we can't
generate reloads for.

Diff:
---
 gcc/config/rs6000/constraints.md  |  5 -
 gcc/config/rs6000/rs6000-cpus.def |  4 +++-
 gcc/config/rs6000/rs6000.cc   | 41 +--
 gcc/config/rs6000/rs6000.h| 31 +
 gcc/config/rs6000/rs6000.md   | 23 +++---
 gcc/config/rs6000/rs6000.opt  |  4 
 gcc/doc/invoke.texi   | 12 ++--
 gcc/lra-constraints.cc|  9 ++---
 8 files changed, 93 insertions(+), 36 deletions(-)

diff --git a/gcc/config/rs6000/constraints.md b/gcc/config/rs6000/constraints.md
index 369a7b75042..14f0465d7ae 100644
--- a/gcc/config/rs6000/constraints.md
+++ b/gcc/config/rs6000/constraints.md
@@ -57,7 +57,7 @@
   "@internal A compatibility alias for @code{wa}.")
 
 (define_register_constraint "h" "SPECIAL_REGS"
-  "@internal A special register (@code{vrsave}, @code{ctr}, or @code{lr}).")
+  "@internal A special register (@code{vrsave}, @code{ctr}, @code{lr} or 
@code{tar}).")
 
 (define_register_constraint "c" "CTR_REGS"
   "The count register, @code{ctr}.")
@@ -91,6 +91,9 @@
   "@internal Like @code{r}, if @option{-mpowerpc64} is used; otherwise,
@code{NO_REGS}.")
 
+(define_register_constraint "wt" "rs6000_constraints[RS6000_CONSTRAINT_wt]"
+  "The tar register, @code{tar}.")
+
 (define_register_constraint "wx" "rs6000_constraints[RS6000_CONSTRAINT_wx]"
   "@internal Like @code{d}, if @option{-mpowerpc-gfxopt} is used; otherwise,
@code{NO_REGS}.")
diff --git a/gcc/config/rs6000/rs6000-cpus.def 
b/gcc/config/rs6000/rs6000-cpus.def
index d625dbeb91f..29a5398b16d 100644
--- a/gcc/config/rs6000/rs6000-cpus.def
+++ b/gcc/config/rs6000/rs6000-cpus.def
@@ -52,7 +52,8 @@
 | OPTION_MASK_CRYPTO   \
 | OPTION_MASK_EFFICIENT_UNALIGNED_VSX  \
 | OPTION_MASK_QUAD_MEMORY  \
-| OPTION_MASK_QUAD_MEMORY_ATOMIC)
+| OPTION_MASK_QUAD_MEMORY_ATOMIC   \
+| OPTION_MASK_TAR)
 
 /* ISA masks setting fusion options.  */
 #define OTHER_FUSION_MASKS (OPTION_MASK_P8_FUSION  \
@@ -158,6 +159,7 @@
 | OPTION_MASK_RECIP_PRECISION  \
 | OPTION_MASK_SOFT_FLOAT   \
 | OPTION_MASK_STRICT_ALIGN_OPTIONAL\
+| OPTION_MASK_TAR  \
 | OPTION_MASK_VSX)
 
 #endif
diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index 5bb66dca81d..463d27fa61b 100644
--- a/gcc/config/rs6000/rs6000.cc
+++ b/gcc/config/rs6000/rs6000.cc
@@ -1224,8 +1224,8 @@ char rs6000_reg_names[][8] =

Results for 15.0.0 20240503 (experimental) [remotes/origin/HEAD r15-140-gb69dac54ef] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-05-03 Thread Bill Seurer (POWER9 IEEE128) via Gcc-testresults
/torture/pr52451.c   -O1  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr52451.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr52451.c   -Os  execution test
FAIL: gcc.dg/tree-ssa/abs-4.c scan-tree-dump-times optimized "= -" 1
FAIL: gcc.dg/tree-ssa/abs-4.c scan-tree-dump-times optimized "= .COPYSIGN" 2
FAIL: gcc.dg/tree-ssa/abs-4.c scan-tree-dump-times optimized "= ABS_EXPR" 1
FAIL: gcc.dg/tree-ssa/backprop-6.c scan-tree-dump-times backprop 
"Deleting[^n]* = -" 4
FAIL: gcc.dg/tree-ssa/backprop-6.c scan-tree-dump-times backprop 
"Deleting[^n]* = ABS_EXPR <" 1
FAIL: gcc.dg/tree-ssa/backprop-6.c scan-tree-dump-times backprop 
"Deleting[^n]* = .COPYSIGN" 2
XPASS: gcc.dg/tree-ssa/ssa-dom-cse-2.c scan-tree-dump optimized "return 28;"
FAIL: gcc.dg/tree-ssa/update-threading.c scan-tree-dump-times optimized 
"Invalid sum" 0
FAIL: gcc.dg/vect/vect-117.c -flto -ffat-lto-objects  scan-tree-dump-not 
optimized "Invalid sum"
FAIL: gcc.dg/vect/vect-117.c scan-tree-dump-not optimized "Invalid sum"
FAIL: gcc.target/powerpc/pr105334.c (test for excess errors)
FAIL: gcc.target/powerpc/rlwimi-2.c scan-assembler-times (?n)^s+[a-z] 20217
XPASS: gcc.target/powerpc/ppc-fortran/ieee128-math.f90   -O  (test for excess 
errors)

=== gcc Summary ===

# of expected passes179482
# of unexpected failures90
# of unexpected successes   20
# of expected failures  1619
# of unsupported tests  4251
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xgcc  version 15.0.0 20240503 
(experimental) [remotes/origin/HEAD r15-140-gb69dac54ef] (GCC) 

=== gfortran tests ===


Running target unix
XPASS: gfortran.dg/default_format_2.f90   -O0  execution test
XPASS: gfortran.dg/default_format_2.f90   -O1  execution test
XPASS: gfortran.dg/default_format_2.f90   -O2  execution test
XPASS: gfortran.dg/default_format_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/default_format_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/default_format_2.f90   -Os  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O0  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O1  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O2  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -Os  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O0  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O1  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O2  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -Os  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O0  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O1  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O2  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O3 -g  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -Os  execution test

=== gfortran Summary ===

# of expected passes69847
# of unexpected failures6
# of unexpected successes   18
# of expected failures  273
# of unsupported tests  177
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/gfortran  version 15.0.0 
20240503 (experimental) [remotes/origin/HEAD r15-140-gb69dac54ef] (GCC) 

=== g++ tests ===


Running target unix

=== g++ Summary ===

# of expected passes260366
# of expected failures  2620
# of unsupported tests  11688
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xg++  version 15.0.0 20240503 
(experimental) [remotes/origin/HEAD r15-140-gb69dac54ef] (GCC) 

=== obj-c++ tests ===


Running target unix

=== obj-c++ Summary ===

# of expected passes1503
# of expected failures  10
# of unsupported tests  79
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xg++  version 15.0.0 20240503 
(experimental) [re

Results for 15.0.0 20240502 (experimental) [master r15-116-gff4dc8b10a4] (GCC) testsuite on hppa-unknown-linux-gnu

2024-05-03 Thread John David Anglin
LAST_UPDATED: Thu May  2 17:16:37 UTC 2024 (revision r15-116-gff4dc8b10a4)

Native configuration is hppa-unknown-linux-gnu

=== gcc tests ===


Running target unix
FAIL: gcc.dg/pr47276.c (internal compiler error: Segmentation fault)
FAIL: gcc.dg/pr47276.c (test for excess errors)
XPASS: gcc.dg/guality/guality.c   -O0  execution test
XPASS: gcc.dg/guality/inline-params.c   -O2  -DPREVENT_OPTIMIZATION  execution 
test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O3 -g  -DPREVENT_OPTIMIZATION  
execution test
XPASS: gcc.dg/guality/inline-params.c   -Os  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/ipa-sra-1.c   -O2  -DPREVENT_OPTIMIZATION  line 31 k == 3
FAIL: gcc.dg/guality/ipa-sra-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 31 k == 3
FAIL: gcc.dg/guality/ipa-sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 31 k == 3
FAIL: gcc.dg/guality/ipa-sra-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 31 k == 
3
FAIL: gcc.dg/guality/ipa-sra-1.c   -Os  -DPREVENT_OPTIMIZATION  line 31 k == 3
FAIL: gcc.dg/guality/loop-1.c   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/nrv-1.c   -O2  -DPREVENT_OPTIMIZATION  line 20 a2.i[0] == 
42
FAIL: gcc.dg/guality/nrv-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 a2.i[0] == 42
FAIL: gcc.dg/guality/nrv-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 a2.i[0] == 42
FAIL: gcc.dg/guality/nrv-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 a2.i[0] 
== 42
FAIL: gcc.dg/guality/nrv-1.c   -Os  -DPREVENT_OPTIMIZATION  line 20 a2.i[0] == 
42
FAIL: gcc.dg/guality/pr36728-1.c   -O1  -DPREVENT_OPTIMIZATION  line 16 arg5 == 
5
FAIL: gcc.dg/guality/pr36728-1.c   -O1  -DPREVENT_OPTIMIZATION  line 16 arg6 == 
6
FAIL: gcc.dg/guality/pr36728-1.c   -O1  -DPREVENT_OPTIMIZATION  line 16 arg7 == 
30
FAIL: gcc.dg/guality/pr36728-1.c   -O1  -DPREVENT_OPTIMIZATION  line 18 arg5 == 
5
FAIL: gcc.dg/guality/pr36728-1.c   -O1  -DPREVENT_OPTIMIZATION  line 18 arg6 == 
6
FAIL: gcc.dg/guality/pr36728-1.c   -O1  -DPREVENT_OPTIMIZATION  line 18 arg7 == 
30
FAIL: gcc.dg/guality/pr36728-1.c   -O2  -DPREVENT_OPTIMIZATION  line 16 arg5 == 
5
FAIL: gcc.dg/guality/pr36728-1.c   -O2  -DPREVENT_OPTIMIZATION  line 16 arg6 == 
6
FAIL: gcc.dg/guality/pr36728-1.c   -O2  -DPREVENT_OPTIMIZATION  line 16 arg7 == 
30
FAIL: gcc.dg/guality/pr36728-1.c   -O2  -DPREVENT_OPTIMIZATION  line 18 arg5 == 
5
FAIL: gcc.dg/guality/pr36728-1.c   -O2  -DPREVENT_OPTIMIZATION  line 18 arg6 == 
6
FAIL: gcc.dg/guality/pr36728-1.c   -O2  -DPREVENT_OPTIMIZATION  line 18 arg7 == 
30
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 16 arg5 == 5
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 16 arg6 == 6
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 16 arg7 == 30
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 18 arg5 == 5
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 18 arg6 == 6
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 18 arg7 == 30
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg1 == 1
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg2 == 2
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg3 == 3
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg4 == 4
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg5 == 5
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg6 == 6
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg1 == 1
FAIL: gcc.dg/guality/pr36728-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg2 == 2
FAIL: 

[gcc(refs/users/meissner/heads/work165-dmf)] Update ChangeLog.*

2024-05-03 Thread Michael Meissner via Gcc-cvs
https://gcc.gnu.org/g:2504d90098995277aed551c7fb771ce753b76285

commit 2504d90098995277aed551c7fb771ce753b76285
Author: Michael Meissner 
Date:   Fri May 3 21:14:51 2024 -0400

Update ChangeLog.*

Diff:
---
 gcc/ChangeLog.dmf | 449 +-
 1 file changed, 448 insertions(+), 1 deletion(-)

diff --git a/gcc/ChangeLog.dmf b/gcc/ChangeLog.dmf
index d94e03e767e..9aab2635c98 100644
--- a/gcc/ChangeLog.dmf
+++ b/gcc/ChangeLog.dmf
@@ -1,6 +1,453 @@
+ Branch work165-dmf, patch #113 
+
+RFC2677-Add xvrlw support.
+
+2024-05-03  Michael Meissner  
+
+gcc/
+
+   * config/rs6000/altivec.md (xvrlw): New insn.
+   * config/rs6000/rs6000.h (TARGET_XVRLW): New macro.
+
+gcc/testsuite/
+
+   * gcc.target/powerpc/vector-rotate-left.c: New test.
+
+ Branch work165-dmf, patch #112 
+
+RFC2686-Add paddis support.
+
+2024-05-03  Michael Meissner  
+
+gcc/
+
+   * config/rs6000/constraints.md (eU): New constraint.
+   (eV): Likewise.
+   * config/rs6000/predicates.md (paddis_operand): New predicate.
+   (paddis_paddi_operand): Likewise.
+   (add_operand): Add paddis support.
+   * config/rs6000/rs6000.cc (num_insns_constant_gpr): Add paddis support.
+   (num_insns_constant_multi): Likewise.
+   (print_operand): Add %B for paddis support.
+   * config/rs6000/rs6000.h (TARGET_PADDIS): New macro.
+   (SIGNED_INTEGER_32BIT_P): Likewise.
+   * config/rs6000/rs6000.md (isa attribute): Add paddis support.
+   (enabled attribute); Likewise.
+   (add3): Likewise.
+   (adddi3 splitter): New splitter for paddis.
+   (movdi_internal64): Add paddis support.
+   (movdi splitter): New splitter for paddis.
+
+gcc/testsuite/
+
+   * gcc.target/powerpc/prefixed-addis.c: New test.
+
+ Branch work165-dmf, patch #111 
+
+RFC2655-Add saturating subtract built-ins.
+
+This patch adds support for a saturating subtract built-in function that may be
+added to a future PowerPC processor.  Note, if it is added, the name of the
+built-in function may change before GCC 13 is released.  If the name changes,
+we will submit a patch changing the name.
+
+I also added support for providing dense math built-in functions, even though
+at present, we have not added any new built-in functions for dense math.  It is
+likely we will want to add new dense math built-in functions as the dense math
+support is fleshed out.
+
+The patches have been tested on both little and big endian systems.  Can I 
check
+it into the master branch?
+
+2024-05-03   Michael Meissner  
+
+gcc/
+
+   * config/rs6000/rs6000-builtin.cc (rs6000_invalid_builtin): Add support
+   for flagging invalid use of future built-in functions.
+   (rs6000_builtin_is_supported): Add support for future built-in
+   functions.
+   * config/rs6000/rs6000-builtins.def (__builtin_saturate_subtract32): New
+   built-in function for -mcpu=future.
+   (__builtin_saturate_subtract64): Likewise.
+   * config/rs6000/rs6000-gen-builtins.cc (enum bif_stanza): Add stanzas
+   for -mcpu=future built-ins.
+   (stanza_map): Likewise.
+   (enable_string): Likewise.
+   (struct attrinfo): Likewise.
+   (parse_bif_attrs): Likewise.
+   (write_decls): Likewise.
+   * config/rs6000/rs6000.md (sat_sub3): Add saturating subtract
+   built-in insn declarations.
+   (sat_sub3_dot): Likewise.
+   (sat_sub3_dot2): Likewise.
+   * doc/extend.texi (Future PowerPC built-ins): New section.
+
+gcc/testsuite/
+
+   * gcc.target/powerpc/subfus-1.c: New test.
+   * gcc.target/powerpc/subfus-2.c: Likewise.
+
+ Branch work165-dmf, patch #110 
+
+RFC2656-Support load/store vector with right length.
+
+This patch adds support for new instructions that may be added to the PowerPC
+architecture in the future to enhance the load and store vector with length
+instructions.
+
+The current instructions (lxvl, lxvll, stxvl, and stxvll) are inconvient to use
+since the count for the number of bytes must be in the top 8 bits of the GPR
+register, instead of the bottom 8 bits.  This meant that code generating these
+instructions typically had to do a shift left by 56 bits to get the count into
+the right position.  In a future version of the PowerPC architecture, new
+variants of these instructions might be added that expect the count to be in
+the bottom 8 bits of the GPR register.  These patches add this support to GCC
+if the user uses the -mcpu=future option.
+
+I discovered that the code in rs6000-string.cc to generate ISA 3.1 lxvl/stxvl
+future lxvll/stxvll instructions would generate these instructions on 32-bit.
+However the patterns for these instructions is only done on 64-bit systems.  So
+I added a check for 64-bit support before generating the instructions.
+
+The patches 

[gcc(refs/users/meissner/heads/work165-dmf)] RFC2677-Add xvrlw support.

2024-05-03 Thread Michael Meissner via Gcc-cvs
https://gcc.gnu.org/g:f44372f7e53e70b3a18822cbcc9fd024efea1152

commit f44372f7e53e70b3a18822cbcc9fd024efea1152
Author: Michael Meissner 
Date:   Fri May 3 21:06:39 2024 -0400

RFC2677-Add xvrlw support.

2024-05-03  Michael Meissner  

gcc/

* config/rs6000/altivec.md (xvrlw): New insn.
* config/rs6000/rs6000.h (TARGET_XVRLW): New macro.

gcc/testsuite/

* gcc.target/powerpc/vector-rotate-left.c: New test.

Diff:
---
 gcc/config/rs6000/altivec.md   | 14 +
 gcc/config/rs6000/rs6000.h |  3 ++
 .../gcc.target/powerpc/vector-rotate-left.c| 34 ++
 3 files changed, 51 insertions(+)

diff --git a/gcc/config/rs6000/altivec.md b/gcc/config/rs6000/altivec.md
index bb20441c096..5e802c59b69 100644
--- a/gcc/config/rs6000/altivec.md
+++ b/gcc/config/rs6000/altivec.md
@@ -1883,6 +1883,20 @@
 }
   [(set_attr "type" "vecperm")])
 
+;; -mcpu=future adds a vector rotate left word variant.  There is no vector
+;; byte/half-word/double-word/quad-word rotate left.  This insn occurs before
+;; altivec_vrl and will match for -mcpu=future, while other cpus will
+;; match the generic insn.
+(define_insn "*xvrlw"
+  [(set (match_operand:V4SI 0 "register_operand" "=v,wa")
+   (rotate:V4SI (match_operand:V4SI 1 "register_operand" "v,wa")
+(match_operand:V4SI 2 "register_operand" "v,wa")))]
+  "TARGET_XVRLW"
+  "@
+   vrlw %0,%1,%2
+   xvrlw %x0,%x1,%x2"
+  [(set_attr "type" "vecsimple")])
+
 (define_insn "altivec_vrl"
   [(set (match_operand:VI2 0 "register_operand" "=v")
 (rotate:VI2 (match_operand:VI2 1 "register_operand" "v")
diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h
index 1c44726f074..474c47a7959 100644
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -578,6 +578,9 @@ extern int rs6000_vector_align[];
 /* Whether we have PADDIS support.  */
 #define TARGET_PADDIS  TARGET_FUTURE
 
+/* Whether we have XVRLW support.  */
+#define TARGET_XVRLW   TARGET_FUTURE
+
 /* Whether the various reciprocal divide/square root estimate instructions
exist, and whether we should automatically generate code for the instruction
by default.  */
diff --git a/gcc/testsuite/gcc.target/powerpc/vector-rotate-left.c 
b/gcc/testsuite/gcc.target/powerpc/vector-rotate-left.c
new file mode 100644
index 000..5a5f3775507
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vector-rotate-left.c
@@ -0,0 +1,34 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_future_ok } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-mdejagnu-cpu=future -O2" } */
+
+/* Test whether the xvrl (vector word rotate left using VSX registers insead of
+   Altivec registers is generated.  */
+
+#include 
+
+typedef vector unsigned int  v4si_t;
+
+v4si_t
+rotl_v4si_scalar (v4si_t x, unsigned long n)
+{
+  __asm__ (" # %x0" : "+f" (x));
+  return (x << n) | (x >> (32 - n));   /* xvrlw.  */
+}
+
+v4si_t
+rotr_v4si_scalar (v4si_t x, unsigned long n)
+{
+  __asm__ (" # %x0" : "+f" (x));
+  return (x >> n) | (x << (32 - n));   /* xvrlw.  */
+}
+
+v4si_t
+rotl_v4si_vector (v4si_t x, v4si_t y)
+{
+  __asm__ (" # %x0" : "+f" (x));   /* xvrlw.  */
+  return vec_rl (x, y);
+}
+
+/* { dg-final { scan-assembler-times {\mxvrlw\M} 3  } } */


[gcc(refs/users/meissner/heads/work165-dmf)] RFC2686-Add paddis support.

2024-05-03 Thread Michael Meissner via Gcc-cvs
https://gcc.gnu.org/g:c2f3d78cf66caa49c8379cca1f2604bf1de4b2fc

commit c2f3d78cf66caa49c8379cca1f2604bf1de4b2fc
Author: Michael Meissner 
Date:   Fri May 3 20:57:14 2024 -0400

RFC2686-Add paddis support.

2024-05-03  Michael Meissner  

gcc/

* config/rs6000/constraints.md (eU): New constraint.
(eV): Likewise.
* config/rs6000/predicates.md (paddis_operand): New predicate.
(paddis_paddi_operand): Likewise.
(add_operand): Add paddis support.
* config/rs6000/rs6000.cc (num_insns_constant_gpr): Add paddis 
support.
(num_insns_constant_multi): Likewise.
(print_operand): Add %B for paddis support.
* config/rs6000/rs6000.h (TARGET_PADDIS): New macro.
(SIGNED_INTEGER_32BIT_P): Likewise.
* config/rs6000/rs6000.md (isa attribute): Add paddis support.
(enabled attribute); Likewise.
(add3): Likewise.
(adddi3 splitter): New splitter for paddis.
(movdi_internal64): Add paddis support.
(movdi splitter): New splitter for paddis.

gcc/testsuite/

* gcc.target/powerpc/prefixed-addis.c: New test.

Diff:
---
 gcc/config/rs6000/constraints.md  | 10 +++
 gcc/config/rs6000/predicates.md   | 52 +++-
 gcc/config/rs6000/rs6000.cc   | 25 ++
 gcc/config/rs6000/rs6000.h|  4 +
 gcc/config/rs6000/rs6000.md   | 96 ---
 gcc/testsuite/gcc.target/powerpc/prefixed-addis.c | 24 ++
 6 files changed, 197 insertions(+), 14 deletions(-)

diff --git a/gcc/config/rs6000/constraints.md b/gcc/config/rs6000/constraints.md
index 277a30a8245..4d8d21fd6bb 100644
--- a/gcc/config/rs6000/constraints.md
+++ b/gcc/config/rs6000/constraints.md
@@ -222,6 +222,16 @@
   "An IEEE 128-bit constant that can be loaded into VSX registers."
   (match_operand 0 "easy_vector_constant_ieee128"))
 
+(define_constraint "eU"
+  "@internal integer constant that can be loaded with paddis"
+  (and (match_code "const_int")
+   (match_operand 0 "paddis_operand")))
+
+(define_constraint "eV"
+  "@internal integer constant that can be loaded with paddis + paddi"
+  (and (match_code "const_int")
+   (match_operand 0 "paddis_paddi_operand")))
+
 ;; Floating-point constraints.  These two are defined so that insn
 ;; length attributes can be calculated exactly.
 
diff --git a/gcc/config/rs6000/predicates.md b/gcc/config/rs6000/predicates.md
index b325000690b..0b7c0bf4b0f 100644
--- a/gcc/config/rs6000/predicates.md
+++ b/gcc/config/rs6000/predicates.md
@@ -369,6 +369,53 @@
   return SIGNED_INTEGER_34BIT_P (INTVAL (op));
 })
 
+;; Return 1 if op is a 64-bit constant that uses the paddis instruction
+(define_predicate "paddis_operand"
+  (match_code "const_int")
+{
+  if (!TARGET_PADDIS && TARGET_POWERPC64)
+return 0;
+
+  /* If addi, addis, or paddi can handle the number, don't return true.  */
+  HOST_WIDE_INT value = INTVAL (op);
+  if (SIGNED_INTEGER_34BIT_P (value))
+return false;
+
+  /* If the number is too large for padds, return false.  */
+  if (!SIGNED_INTEGER_32BIT_P (value >> 32))
+return false;
+
+  /* If the bottom 32-bits are non-zero, paddis can't handle it.  */
+  if ((value & HOST_WIDE_INT_C(0x)) != 0)
+return false;
+
+  return true;
+})
+
+;; Return 1 if op is a 64-bit constant that needs the paddis instruction and an
+;; addi/addis/paddi instruction combination.
+(define_predicate "paddis_paddi_operand"
+  (match_code "const_int")
+{
+  if (!TARGET_PADDIS && TARGET_POWERPC64)
+return 0;
+
+  /* If addi, addis, or paddi can handle the number, don't return true.  */
+  HOST_WIDE_INT value = INTVAL (op);
+  if (SIGNED_INTEGER_34BIT_P (value))
+return false;
+
+  /* If the number is too large for padds, return false.  */
+  if (!SIGNED_INTEGER_32BIT_P (value >> 32))
+return false;
+
+  /* If the bottom 32-bits are zero, we can use paddis alone to handle it.  */
+  if ((value & HOST_WIDE_INT_C(0x)) == 0)
+return false;
+
+  return true;
+})
+
 ;; Return 1 if op is a register that is not special.
 ;; Disallow (SUBREG:SF (REG:SI)) and (SUBREG:SI (REG:SF)) on VSX systems where
 ;; you need to be careful in moving a SFmode to SImode and vice versa due to
@@ -1050,7 +1097,10 @@
   (if_then_else (match_code "const_int")
 (match_test "satisfies_constraint_I (op)
 || satisfies_constraint_L (op)
-|| satisfies_constraint_eI (op)")
+|| satisfies_constraint_eI (op)
+|| satisfies_constraint_eU (op)
+|| satisfies_constraint_eV (op)")
+
 (match_operand 0 "gpc_reg_operand")))
 
 ;; Return 1 if the operand is either a non-special register, or 0, or -1.
diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc
index 4dabf13aee9..160db4bba7a 100644
--- 

Results for 15.0.0 20240503 (experimental) [remotes/origin/HEAD r15-140-gb69dac54ef] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-05-03 Thread Bill Seurer (POWER8) via Gcc-testresults
-partition=none  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr68860-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr68860-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 y == 
2
FAIL: gcc.dg/guality/pr68860-1.c   -Os  -DPREVENT_OPTIMIZATION  line 16 y == 2
FAIL: gcc.dg/guality/pr68860-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr68860-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 y == 
2
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 21 a.i == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 21 a.j == 14
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 32 a[0] == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 32 a[1] == 14
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 43 a.i == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 43 a.j == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 21 a.i == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 21 a.j == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 32 a[0] == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 32 a[1] == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 43 a.i == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 43 a.j == 14
FAIL: gcc.dg/guality/vla-1.c   -O2  -DPREVENT_OPTIMIZATION  line 17 sizeof (a) 
== 6
FAIL: gcc.dg/guality/vla-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 17 sizeof (a) == 6
FAIL: gcc.dg/guality/vla-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 17 sizeof (a) == 6
FAIL: gcc.dg/guality/vla-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 17 sizeof 
(a) == 6
FAIL: gcc.dg/guality/vla-1.c   -Os  -DPREVENT_OPTIMIZATION  line 17 sizeof (a) 
== 6
FAIL: gcc.dg/torture/pr52451.c   -O0  execution test
FAIL: gcc.dg/torture/pr52451.c   -O1  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr52451.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr52451.c   -Os  execution test
XPASS: gcc.dg/tree-ssa/ssa-dom-cse-2.c scan-tree-dump optimized "return 28;"
FAIL: gcc.dg/tree-ssa/update-threading.c scan-tree-dump-times optimized 
"Invalid sum" 0
FAIL: gcc.dg/vect/vect-117.c -flto -ffat-lto-objects  scan-tree-dump-not 
optimized "Invalid sum"
FAIL: gcc.dg/vect/vect-117.c scan-tree-dump-not optimized "Invalid sum"
FAIL: gcc.target/powerpc/rlwimi-2.c scan-assembler-times (?n)^s+[a-z] 20217
XPASS: gcc.target/powerpc/ppc-fortran/ieee128-math.f90   -O  (test for excess 
errors)

=== gcc Summary ===

# of expected passes178463
# of unexpected failures121
# of unexpected successes   13
# of expected failures  1602
# of unsupported tests  5035
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xgcc  version 15.0.0 20240503 
(experimental) [remotes/origin/HEAD r15-140-gb69dac54ef] (GCC) 

=== gfortran tests ===


Running target unix
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O0  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O1  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O2  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -Os  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O0  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O1  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O2  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O3 -g  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -Os  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O0  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O1  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O2  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  execution test
FAI

[gcc(refs/users/meissner/heads/work165-dmf)] RFC2655-Add saturating subtract built-ins.

2024-05-03 Thread Michael Meissner via Gcc-cvs
https://gcc.gnu.org/g:050e208c0ee395174512f6248ae173ad152e3cd0

commit 050e208c0ee395174512f6248ae173ad152e3cd0
Author: Michael Meissner 
Date:   Fri May 3 20:44:50 2024 -0400

RFC2655-Add saturating subtract built-ins.

This patch adds support for a saturating subtract built-in function that 
may be
added to a future PowerPC processor.  Note, if it is added, the name of the
built-in function may change before GCC 13 is released.  If the name 
changes,
we will submit a patch changing the name.

I also added support for providing dense math built-in functions, even 
though
at present, we have not added any new built-in functions for dense math.  
It is
likely we will want to add new dense math built-in functions as the dense 
math
support is fleshed out.

The patches have been tested on both little and big endian systems.  Can I 
check
it into the master branch?

2024-05-03   Michael Meissner  

gcc/

* config/rs6000/rs6000-builtin.cc (rs6000_invalid_builtin): Add 
support
for flagging invalid use of future built-in functions.
(rs6000_builtin_is_supported): Add support for future built-in
functions.
* config/rs6000/rs6000-builtins.def 
(__builtin_saturate_subtract32): New
built-in function for -mcpu=future.
(__builtin_saturate_subtract64): Likewise.
* config/rs6000/rs6000-gen-builtins.cc (enum bif_stanza): Add 
stanzas
for -mcpu=future built-ins.
(stanza_map): Likewise.
(enable_string): Likewise.
(struct attrinfo): Likewise.
(parse_bif_attrs): Likewise.
(write_decls): Likewise.
* config/rs6000/rs6000.md (sat_sub3): Add saturating subtract
built-in insn declarations.
(sat_sub3_dot): Likewise.
(sat_sub3_dot2): Likewise.
* doc/extend.texi (Future PowerPC built-ins): New section.

gcc/testsuite/

* gcc.target/powerpc/subfus-1.c: New test.
* gcc.target/powerpc/subfus-2.c: Likewise.

Diff:
---
 gcc/config/rs6000/rs6000-builtin.cc | 17 
 gcc/config/rs6000/rs6000-builtins.def   | 10 +
 gcc/config/rs6000/rs6000-gen-builtins.cc| 35 ++---
 gcc/config/rs6000/rs6000.md | 60 +
 gcc/doc/extend.texi | 24 
 gcc/testsuite/gcc.target/powerpc/subfus-1.c | 32 +++
 gcc/testsuite/gcc.target/powerpc/subfus-2.c | 32 +++
 7 files changed, 205 insertions(+), 5 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-builtin.cc 
b/gcc/config/rs6000/rs6000-builtin.cc
index 4b315cca351..172e5621f54 100644
--- a/gcc/config/rs6000/rs6000-builtin.cc
+++ b/gcc/config/rs6000/rs6000-builtin.cc
@@ -139,6 +139,17 @@ rs6000_invalid_builtin (enum rs6000_gen_builtins fncode)
 case ENB_MMA:
   error ("%qs requires the %qs option", name, "-mmma");
   break;
+case ENB_FUTURE:
+  error ("%qs requires the %qs option", name, "-mcpu=future");
+  break;
+case ENB_FUTURE_64:
+  error ("%qs requires the %qs option and either the %qs or %qs option",
+name, "-mcpu=future", "-m64", "-mpowerpc64");
+  break;
+case ENB_DM:
+  error ("%qs requires the %qs or %qs options", name, "-mcpu=future",
+"-mdense-math");
+  break;
 default:
 case ENB_ALWAYS:
   gcc_unreachable ();
@@ -194,6 +205,12 @@ rs6000_builtin_is_supported (enum rs6000_gen_builtins 
fncode)
   return TARGET_HTM;
 case ENB_MMA:
   return TARGET_MMA;
+case ENB_FUTURE:
+  return TARGET_FUTURE;
+case ENB_FUTURE_64:
+  return TARGET_FUTURE && TARGET_POWERPC64;
+case ENB_DM:
+  return TARGET_DENSE_MATH;
 default:
   gcc_unreachable ();
 }
diff --git a/gcc/config/rs6000/rs6000-builtins.def 
b/gcc/config/rs6000/rs6000-builtins.def
index 3bc7fed6956..437ab0e09e9 100644
--- a/gcc/config/rs6000/rs6000-builtins.def
+++ b/gcc/config/rs6000/rs6000-builtins.def
@@ -139,6 +139,8 @@
 ;   endian   Needs special handling for endianness
 ;   ibmldRestrict usage to the case when TFmode is IBM-128
 ;   ibm128   Restrict usage to the case where __ibm128 is supported or if ibmld
+;   future   Restrict usage to future instructions
+;   dm   Restrict usage to dense math
 ;
 ; Each attribute corresponds to extra processing required when
 ; the built-in is expanded.  All such special processing should
@@ -4131,3 +4133,11 @@
 
   void __builtin_vsx_stxvp (v256, unsigned long, const v256 *);
 STXVP nothing {mma,pair}
+
+[future]
+  const signed int __builtin_saturate_subtract32 (signed int, signed int);
+  SAT_SUBSI sat_subsi3 {}
+
+[future-64]
+  const signed long __builtin_saturate_subtract64 (signed long,  signed long);
+  SAT_SUBDI sat_subdi3 {}
diff --git a/gcc/config/rs6000/rs6000-gen-builtins.cc 

[gcc(refs/users/meissner/heads/work165-dmf)] RFC2656-Support load/store vector with right length.

2024-05-03 Thread Michael Meissner via Gcc-cvs
https://gcc.gnu.org/g:e3be5e2b224450ef7468af4e04755aa0dc0980ad

commit e3be5e2b224450ef7468af4e04755aa0dc0980ad
Author: Michael Meissner 
Date:   Fri May 3 20:39:15 2024 -0400

RFC2656-Support load/store vector with right length.

This patch adds support for new instructions that may be added to the 
PowerPC
architecture in the future to enhance the load and store vector with length
instructions.

The current instructions (lxvl, lxvll, stxvl, and stxvll) are inconvient to 
use
since the count for the number of bytes must be in the top 8 bits of the GPR
register, instead of the bottom 8 bits.  This meant that code generating 
these
instructions typically had to do a shift left by 56 bits to get the count 
into
the right position.  In a future version of the PowerPC architecture, new
variants of these instructions might be added that expect the count to be in
the bottom 8 bits of the GPR register.  These patches add this support to 
GCC
if the user uses the -mcpu=future option.

I discovered that the code in rs6000-string.cc to generate ISA 3.1 
lxvl/stxvl
future lxvll/stxvll instructions would generate these instructions on 
32-bit.
However the patterns for these instructions is only done on 64-bit systems. 
 So
I added a check for 64-bit support before generating the instructions.

The patches have been tested on both little and big endian systems.  Can I 
check
it into the master branch?

2024-05-03   Michael Meissner  

gcc/

* config/rs6000/rs6000-string.cc (expand_block_move): Do not 
generate
lxvl and stxvl on 32-bit.
* config/rs6000/vsx.md (lxvl): If -mcpu=future, generate the lxvl 
with
the shift count automaticaly used in the insn.
(lxvrl): New insn for -mcpu=future.
(lxvrll): Likewise.
(stxvl): If -mcpu=future, generate the stxvl with the shift count
automaticaly used in the insn.
(stxvrl): New insn for -mcpu=future.
(stxvrll): Likewise.

gcc/testsuite/

* gcc.target/powerpc/lxvrl.c: New test.
* lib/target-supports.exp 
(check_effective_target_powerpc_future_ok):
New effective target.

Diff:
---
 gcc/config/rs6000/rs6000-string.cc   |   1 +
 gcc/config/rs6000/vsx.md | 122 +--
 gcc/testsuite/gcc.target/powerpc/lxvrl.c |  32 
 gcc/testsuite/lib/target-supports.exp|  12 +++
 4 files changed, 146 insertions(+), 21 deletions(-)

diff --git a/gcc/config/rs6000/rs6000-string.cc 
b/gcc/config/rs6000/rs6000-string.cc
index e74ccf41937..c6737e66cbe 100644
--- a/gcc/config/rs6000/rs6000-string.cc
+++ b/gcc/config/rs6000/rs6000-string.cc
@@ -2787,6 +2787,7 @@ expand_block_move (rtx operands[], bool might_overlap)
 
   if (TARGET_MMA && TARGET_BLOCK_OPS_UNALIGNED_VSX
  && TARGET_BLOCK_OPS_VECTOR_PAIR
+ && TARGET_POWERPC64
  && bytes >= 32
  && (align >= 256 || !STRICT_ALIGNMENT))
{
diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md
index f135fa079bd..9520191e613 100644
--- a/gcc/config/rs6000/vsx.md
+++ b/gcc/config/rs6000/vsx.md
@@ -5629,20 +5629,32 @@
   DONE;
 })
 
-;; Load VSX Vector with Length
+;; Load VSX Vector with Length.  If we have lxvrl, we don't have to do an
+;; explicit shift left into a pseudo.
 (define_expand "lxvl"
-  [(set (match_dup 3)
-(ashift:DI (match_operand:DI 2 "register_operand")
-   (const_int 56)))
-   (set (match_operand:V16QI 0 "vsx_register_operand")
-   (unspec:V16QI
-[(match_operand:DI 1 "gpc_reg_operand")
-  (mem:V16QI (match_dup 1))
- (match_dup 3)]
-UNSPEC_LXVL))]
+  [(use (match_operand:V16QI 0 "vsx_register_operand"))
+   (use (match_operand:DI 1 "gpc_reg_operand"))
+   (use (match_operand:DI 2 "gpc_reg_operand"))]
   "TARGET_P9_VECTOR && TARGET_64BIT"
 {
-  operands[3] = gen_reg_rtx (DImode);
+  rtx shift_len = gen_rtx_ASHIFT (DImode, operands[2], GEN_INT (56));
+  rtx len;
+
+  if (TARGET_FUTURE)
+len = shift_len;
+  else
+{
+  len = gen_reg_rtx (DImode);
+  emit_insn (gen_rtx_SET (len, shift_len));
+}
+
+  rtx dest = operands[0];
+  rtx addr = operands[1];
+  rtx mem = gen_rtx_MEM (V16QImode, addr);
+  rtvec rv = gen_rtvec (3, addr, mem, len);
+  rtx lxvl = gen_rtx_UNSPEC (V16QImode, rv, UNSPEC_LXVL);
+  emit_insn (gen_rtx_SET (dest, lxvl));
+  DONE;
 })
 
 (define_insn "*lxvl"
@@ -5666,6 +5678,34 @@
   "lxvll %x0,%1,%2"
   [(set_attr "type" "vecload")])
 
+;; For lxvrl and lxvrll, use the combiner to eliminate the shift.  The
+;; define_expand for lxvl will already incorporate the shift in generating the
+;; insn.  The lxvll buitl-in function required the user to have already done
+;; the shift.  Defining lxvrll this way, will optimize cases where the user has
+;; done the shift immediately before the 

[gcc(refs/users/meissner/heads/work165-dmf)] RFC2653-PowerPC: Add support for 1, 024 bit DMR registers.

2024-05-03 Thread Michael Meissner via Gcc-cvs
https://gcc.gnu.org/g:7992af1753d9b60cebc5eb360058c04d57053c7a

commit 7992af1753d9b60cebc5eb360058c04d57053c7a
Author: Michael Meissner 
Date:   Fri May 3 20:31:57 2024 -0400

RFC2653-PowerPC: Add support for 1,024 bit DMR registers.

This patch is a prelimianry patch to add the full 1,024 bit dense math 
register
(DMRs) for -mcpu=future.  The MMA 512-bit accumulators map onto the top of 
the
DMR register.

This patch only adds the new 1,024 bit register support.  It does not add
support for any instructions that need 1,024 bit registers instead of 512 
bit
registers.

I used the new mode 'TDOmode' to be the opaque mode used for 1,024 bit
registers.  The 'wD' constraint added in previous patches is used for these
registers.  I added support to do load and store of DMRs via the VSX 
registers,
since there are no load/store dense math instructions.  I added the new 
keyword
'__dmr' to create 1,024 bit types that can be loaded into DMRs.  At 
present, I
don't have aliases for __dmr512 and __dmr1024 that we've discussed 
internally.

The patches have been tested on both little and big endian systems.  Can I 
check
it into the master branch?

2024-05-03   Michael Meissner  

gcc/

* config/rs6000/mma.md (UNSPEC_DM_INSERT512_UPPER): New unspec.
(UNSPEC_DM_INSERT512_LOWER): Likewise.
(UNSPEC_DM_EXTRACT512): Likewise.
(UNSPEC_DMR_RELOAD_FROM_MEMORY): Likewise.
(UNSPEC_DMR_RELOAD_TO_MEMORY): Likewise.
(movtdo): New define_expand and define_insn_and_split to implement 
1,024
bit DMR registers.
(movtdo_insert512_upper): New insn.
(movtdo_insert512_lower): Likewise.
(movtdo_extract512): Likewise.
(reload_dmr_from_memory): Likewise.
(reload_dmr_to_memory): Likewise.
* config/rs6000/rs6000-builtin.cc (rs6000_type_string): Add DMR
support.
(rs6000_init_builtins): Add support for __dmr keyword.
* config/rs6000/rs6000-call.cc (rs6000_return_in_memory): Add 
support
for TDOmode.
(rs6000_function_arg): Likewise.
* config/rs6000/rs6000-modes.def (TDOmode): New mode.
* config/rs6000/rs6000.cc (rs6000_hard_regno_nregs_internal): Add
support for TDOmode.
(rs6000_hard_regno_mode_ok_uncached): Likewise.
(rs6000_hard_regno_mode_ok): Likewise.
(rs6000_modes_tieable_p): Likewise.
(rs6000_debug_reg_global): Likewise.
(rs6000_setup_reg_addr_masks): Likewise.
(rs6000_init_hard_regno_mode_ok): Add support for TDOmode.  Setup 
reload
hooks for DMR mode.
(reg_offset_addressing_ok_p): Add support for TDOmode.
(rs6000_emit_move): Likewise.
(rs6000_secondary_reload_simple_move): Likewise.
(rs6000_preferred_reload_class): Likewise.
(rs6000_secondary_reload_class): Likewise.
(rs6000_mangle_type): Add mangling for __dmr type.
(rs6000_dmr_register_move_cost): Add support for TDOmode.
(rs6000_split_multireg_move): Likewise.
(rs6000_invalid_conversion): Likewise.
* config/rs6000/rs6000.h (VECTOR_ALIGNMENT_P): Add TDOmode.
(enum rs6000_builtin_type_index): Add DMR type nodes.
(dmr_type_node): Likewise.
(ptr_dmr_type_node): Likewise.

gcc/testsuite/

* gcc.target/powerpc/dm-1024bit.c: New test.

Diff:
---
 gcc/config/rs6000/mma.md  | 154 ++
 gcc/config/rs6000/rs6000-builtin.cc   |  17 +++
 gcc/config/rs6000/rs6000-call.cc  |  10 +-
 gcc/config/rs6000/rs6000-modes.def|   4 +
 gcc/config/rs6000/rs6000.cc   | 101 -
 gcc/config/rs6000/rs6000.h|   6 +-
 gcc/testsuite/gcc.target/powerpc/dm-1024bit.c |  63 +++
 7 files changed, 321 insertions(+), 34 deletions(-)

diff --git a/gcc/config/rs6000/mma.md b/gcc/config/rs6000/mma.md
index 2e04eb653fa..8461499e1c3 100644
--- a/gcc/config/rs6000/mma.md
+++ b/gcc/config/rs6000/mma.md
@@ -92,6 +92,11 @@
UNSPEC_MMA_XXMFACC
UNSPEC_MMA_XXMTACC
UNSPEC_MMA_DMSETDMRZ
+   UNSPEC_DM_INSERT512_UPPER
+   UNSPEC_DM_INSERT512_LOWER
+   UNSPEC_DM_EXTRACT512
+   UNSPEC_DMR_RELOAD_FROM_MEMORY
+   UNSPEC_DMR_RELOAD_TO_MEMORY
   ])
 
 (define_c_enum "unspecv"
@@ -793,3 +798,152 @@
 }
   [(set_attr "type" "mma")
(set_attr "prefixed" "yes")])
+
+;; TDOmode (__dmr keyword for 1,024 bit registers).
+(define_expand "movtdo"
+  [(set (match_operand:TDO 0 "nonimmediate_operand")
+   (match_operand:TDO 1 "input_operand"))]
+  "TARGET_MMA_DENSE_MATH"
+{
+  rs6000_emit_move (operands[0], operands[1], TDOmode);
+  DONE;
+})
+
+(define_insn_and_split "*movtdo"
+  [(set (match_operand:TDO 0 

[gcc(refs/users/meissner/heads/work165-dmf)] RFC2653-Add dense math test for new instruction names.

2024-05-03 Thread Michael Meissner via Gcc-cvs
https://gcc.gnu.org/g:7c3dc8dcd8d5ab0f99607172153e5c521a79b643

commit 7c3dc8dcd8d5ab0f99607172153e5c521a79b643
Author: Michael Meissner 
Date:   Fri May 3 20:25:28 2024 -0400

RFC2653-Add dense math test for new instruction names.

2024-05-03   Michael Meissner  

gcc/testsuite/

* gcc.target/powerpc/dm-double-test.c: New test.
* lib/target-supports.exp (check_effective_target_ppc_dmr_ok): New
target test.

Diff:
---
 gcc/testsuite/gcc.target/powerpc/dm-double-test.c | 194 ++
 gcc/testsuite/lib/target-supports.exp |  23 +++
 2 files changed, 217 insertions(+)

diff --git a/gcc/testsuite/gcc.target/powerpc/dm-double-test.c 
b/gcc/testsuite/gcc.target/powerpc/dm-double-test.c
new file mode 100644
index 000..66c19779585
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/dm-double-test.c
@@ -0,0 +1,194 @@
+/* Test derived from mma-double-1.c, modified for dense math.  */
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_dense_math_ok } */
+/* { dg-options "-mdejagnu-cpu=future -O2" } */
+
+#include 
+#include 
+#include 
+
+typedef unsigned char vec_t __attribute__ ((vector_size (16)));
+typedef double v4sf_t __attribute__ ((vector_size (16)));
+#define SAVE_ACC(ACC, ldc, J)  \
+ __builtin_mma_disassemble_acc (result, ACC); \
+ rowC = (v4sf_t *) [0*ldc+J]; \
+  rowC[0] += result[0]; \
+  rowC = (v4sf_t *) [1*ldc+J]; \
+  rowC[0] += result[1]; \
+  rowC = (v4sf_t *) [2*ldc+J]; \
+  rowC[0] += result[2]; \
+  rowC = (v4sf_t *) [3*ldc+J]; \
+ rowC[0] += result[3];
+
+void
+DM (int m, int n, int k, double *A, double *B, double *C)
+{
+  __vector_quad acc0, acc1, acc2, acc3, acc4, acc5, acc6, acc7;
+  v4sf_t result[4];
+  v4sf_t *rowC;
+  for (int l = 0; l < n; l += 4)
+{
+  double *CO;
+  double *AO;
+  AO = A;
+  CO = C;
+  C += m * 4;
+  for (int j = 0; j < m; j += 16)
+   {
+ double *BO = B;
+ __builtin_mma_xxsetaccz ();
+ __builtin_mma_xxsetaccz ();
+ __builtin_mma_xxsetaccz ();
+ __builtin_mma_xxsetaccz ();
+ __builtin_mma_xxsetaccz ();
+ __builtin_mma_xxsetaccz ();
+ __builtin_mma_xxsetaccz ();
+ __builtin_mma_xxsetaccz ();
+ unsigned long i;
+
+ for (i = 0; i < k; i++)
+   {
+ vec_t *rowA = (vec_t *) & AO[i * 16];
+ __vector_pair rowB;
+ vec_t *rb = (vec_t *) & BO[i * 4];
+ __builtin_mma_assemble_pair (, rb[1], rb[0]);
+ __builtin_mma_xvf64gerpp (, rowB, rowA[0]);
+ __builtin_mma_xvf64gerpp (, rowB, rowA[1]);
+ __builtin_mma_xvf64gerpp (, rowB, rowA[2]);
+ __builtin_mma_xvf64gerpp (, rowB, rowA[3]);
+ __builtin_mma_xvf64gerpp (, rowB, rowA[4]);
+ __builtin_mma_xvf64gerpp (, rowB, rowA[5]);
+ __builtin_mma_xvf64gerpp (, rowB, rowA[6]);
+ __builtin_mma_xvf64gerpp (, rowB, rowA[7]);
+   }
+ SAVE_ACC (, m, 0);
+ SAVE_ACC (, m, 4);
+ SAVE_ACC (, m, 2);
+ SAVE_ACC (, m, 6);
+ SAVE_ACC (, m, 8);
+ SAVE_ACC (, m, 12);
+ SAVE_ACC (, m, 10);
+ SAVE_ACC (, m, 14);
+ AO += k * 16;
+ BO += k * 4;
+ CO += 16;
+   }
+  B += k * 4;
+}
+}
+
+void
+init (double *matrix, int row, int column)
+{
+  for (int j = 0; j < column; j++)
+{
+  for (int i = 0; i < row; i++)
+   {
+ matrix[j * row + i] = (i * 16 + 2 + j) / 0.123;
+   }
+}
+}
+
+void
+init0 (double *matrix, double *matrix1, int row, int column)
+{
+  for (int j = 0; j < column; j++)
+for (int i = 0; i < row; i++)
+  matrix[j * row + i] = matrix1[j * row + i] = 0;
+}
+
+
+void
+print (const char *name, const double *matrix, int row, int column)
+{
+  printf ("Matrix %s has %d rows and %d columns:\n", name, row, column);
+  for (int i = 0; i < row; i++)
+{
+  for (int j = 0; j < column; j++)
+   {
+ printf ("%f ", matrix[j * row + i]);
+   }
+  printf ("\n");
+}
+  printf ("\n");
+}
+
+int
+main (int argc, char *argv[])
+{
+  int rowsA, colsB, common;
+  int i, j, k;
+  int ret = 0;
+
+  for (int t = 16; t <= 128; t += 16)
+{
+  for (int t1 = 4; t1 <= 16; t1 += 4)
+   {
+ rowsA = t;
+ colsB = t1;
+ common = 1;
+ /* printf ("Running test for rows = %d,cols = %d\n", t, t1); */
+ double A[rowsA * common];
+ double B[common * colsB];
+ double C[rowsA * colsB];
+ double D[rowsA * colsB];
+
+
+ init (A, rowsA, common);
+ init (B, common, colsB);
+ init0 (C, D, rowsA, colsB);
+ DM (rowsA, colsB, common, A, B, C);
+
+ for (i = 0; i < colsB; i++)
+   {
+ for (j = 0; j < rowsA; j++)
+   {
+ 

[gcc(refs/users/meissner/heads/work165-dmf)] RFC2653-PowerPC: Switch to dense math names for all MMA operations.

2024-05-03 Thread Michael Meissner via Gcc-cvs
https://gcc.gnu.org/g:d6ee9c4c5ed2a14f66e32feeffc429d7cd5c0ee2

commit d6ee9c4c5ed2a14f66e32feeffc429d7cd5c0ee2
Author: Michael Meissner 
Date:   Fri May 3 20:23:42 2024 -0400

RFC2653-PowerPC: Switch to dense math names for all MMA operations.

This patch changes the assembler instruction names for MMA instructions from
the original name used in power10 to the new name when used with the dense 
math
system.  I.e. xvf64gerpp becomes dmxvf64gerpp.  The assembler will emit the
same bits for either spelling.

For the non-prefixed MMA instructions, we add a 'dm' prefix in front of the
instruction.  However, the prefixed instructions have a 'pm' prefix, and we 
add
the 'dm' prefix afterwards.  To prevent having two sets of parallel int
attributes, we remove the "pm" prefix from the instruction string in the
attributes, and add it later, both in the insn name and in the output 
template.

2024-05-03   Michael Meissner  

gcc/

* config/rs6000/mma.md (vvi4i4i8): Change the instruction to not 
have a
"pm" prefix.
(avvi4i4i8): Likewise.
(vvi4i4i2): Likewise.
(avvi4i4i2): Likewise.
(vvi4i4): Likewise.
(avvi4i4): Likewise.
(pvi4i2): Likewise.
(apvi4i2): Likewise.
(vvi4i4i4): Likewise.
(avvi4i4i4): Likewise.
(mma_): Add support for running on DMF systems, generating the 
dense
math instruction and using the dense math accumulators.
(mma_): Likewise.
(mma_): Likewise.
(mma_): Likewise.
(mma_pm): Add support for running on DMF systems, 
generating
the dense math instruction and using the dense math accumulators.
Rename the insn with a 'pm' prefix and add either 'pm' or 'pmdm'
prefixes based on whether we have the original MMA specification or 
if
we have dense math support.
(mma_pm): Likewise.
(mma_pm): Likewise.
(mma_pm): Likewise.
(mma_pm): Likewise.
(mma_pm): Likewise.
(mma_pm): Likewise.
(mma_pm): Likewise.

Diff:
---
 gcc/config/rs6000/mma.md | 157 +++
 1 file changed, 104 insertions(+), 53 deletions(-)

diff --git a/gcc/config/rs6000/mma.md b/gcc/config/rs6000/mma.md
index ae6e7e9695b..2e04eb653fa 100644
--- a/gcc/config/rs6000/mma.md
+++ b/gcc/config/rs6000/mma.md
@@ -225,44 +225,47 @@
 (UNSPEC_MMA_XVF64GERNP "xvf64gernp")
 (UNSPEC_MMA_XVF64GERNN "xvf64gernn")])
 
-(define_int_attr vvi4i4i8  [(UNSPEC_MMA_PMXVI4GER8 "pmxvi4ger8")])
+;; The "pm" prefix is not in these expansions, so that we can generate
+;; pmdmxvi4ger8 on systems with dense math registers and xvi4ger8 on systems
+;; without dense math registers.
+(define_int_attr vvi4i4i8  [(UNSPEC_MMA_PMXVI4GER8 "xvi4ger8")])
 
-(define_int_attr avvi4i4i8 [(UNSPEC_MMA_PMXVI4GER8PP   
"pmxvi4ger8pp")])
+(define_int_attr avvi4i4i8 [(UNSPEC_MMA_PMXVI4GER8PP   "xvi4ger8pp")])
 
-(define_int_attr vvi4i4i2  [(UNSPEC_MMA_PMXVI16GER2"pmxvi16ger2")
-(UNSPEC_MMA_PMXVI16GER2S   "pmxvi16ger2s")
-(UNSPEC_MMA_PMXVF16GER2"pmxvf16ger2")
-(UNSPEC_MMA_PMXVBF16GER2   
"pmxvbf16ger2")])
+(define_int_attr vvi4i4i2  [(UNSPEC_MMA_PMXVI16GER2"xvi16ger2")
+(UNSPEC_MMA_PMXVI16GER2S   "xvi16ger2s")
+(UNSPEC_MMA_PMXVF16GER2"xvf16ger2")
+(UNSPEC_MMA_PMXVBF16GER2   "xvbf16ger2")])
 
-(define_int_attr avvi4i4i2 [(UNSPEC_MMA_PMXVI16GER2PP  "pmxvi16ger2pp")
-(UNSPEC_MMA_PMXVI16GER2SPP 
"pmxvi16ger2spp")
-(UNSPEC_MMA_PMXVF16GER2PP  "pmxvf16ger2pp")
-(UNSPEC_MMA_PMXVF16GER2PN  "pmxvf16ger2pn")
-(UNSPEC_MMA_PMXVF16GER2NP  "pmxvf16ger2np")
-(UNSPEC_MMA_PMXVF16GER2NN  "pmxvf16ger2nn")
-(UNSPEC_MMA_PMXVBF16GER2PP 
"pmxvbf16ger2pp")
-(UNSPEC_MMA_PMXVBF16GER2PN 
"pmxvbf16ger2pn")
-(UNSPEC_MMA_PMXVBF16GER2NP 
"pmxvbf16ger2np")
-(UNSPEC_MMA_PMXVBF16GER2NN 
"pmxvbf16ger2nn")])
+(define_int_attr avvi4i4i2 [(UNSPEC_MMA_PMXVI16GER2PP  "xvi16ger2pp")
+(UNSPEC_MMA_PMXVI16GER2SPP "xvi16ger2spp")
+(UNSPEC_MMA_PMXVF16GER2PP  "xvf16ger2pp")
+(UNSPEC_MMA_PMXVF16GER2PN  

[gcc(refs/users/meissner/heads/work165-dmf)] RFC2653-Add support for dense math registers.

2024-05-03 Thread Michael Meissner via Gcc-cvs
https://gcc.gnu.org/g:ee62835648847f71e55d04ec088d9b410e701507

commit ee62835648847f71e55d04ec088d9b410e701507
Author: Michael Meissner 
Date:   Fri May 3 20:18:09 2024 -0400

RFC2653-Add support for dense math registers.

The MMA subsystem added the notion of accumulator registers as an optional
feature of ISA 3.1 (power10).  In ISA 3.1, these accumulators overlapped 
with
the VSX registers 0..31, but logically the accumulator registers were 
separate
from the FPR registers.  In ISA 3.1, it was anticipated that in future 
systems,
the accumulator registers may no overlap with the FPR registers.  This patch
adds the support for dense math registers as separate registers.

This particular patch does not change the MMA support to use the 
accumulators
within the dense math registers.  This patch just adds the basic support for
having separate DMRs.  The next patch will switch the MMA support to use the
accumulators if -mcpu=future is used.

For testing purposes, I added an undocumented option '-mdense-math' to 
enable
or disable the dense math support.

This patch adds a new constraint (wD).  If MMA is selected but dense math is
not selected (i.e. -mcpu=power10), the wD constraint will allow access to
accumulators that overlap with VSX registers 0..31.  If both MMA and dense 
math
are selected (i.e. -mcpu=future), the wD constraint will only allow dense 
math
registers.

This patch modifies the existing %A output modifier.  If MMA is selected but
dense math is not selected, then %A output modifier converts the VSX 
register
number to the accumulator number, by dividing it by 4.  If both MMA and 
dense
math are selected, then %A will map the separate DMR registers into 0..7.

The intention is that user code using extended asm can be modified to run on
both MMA without dense math and MMA with dense math:

1)  If possible, don't use extended asm, but instead use the MMA 
built-in
functions;

2)  If you do need to write extended asm, change the d constraints
targetting accumulators should now use wD;

3)  Only use the built-in zero, assemble and disassemble functions 
create
move data between vector quad types and dense math accumulators.
I.e. do not use the xxmfacc, xxmtacc, and xxsetaccz directly in the
extended asm code.  The reason is these instructions assume there 
is a
1-to-1 correspondence between 4 adjacent FPR registers and an
accumulator that overlaps with those instructions.  With 
accumulators
now being separate registers, there no longer is a 1-to-1
correspondence.

It is possible that the mangling for DMRs and the GDB register numbers may
produce other changes in the future.

2024-05-03   Michael Meissner  

* config/rs6000/mma.md (UNSPEC_MMA_DMSETDMRZ): New unspec.
(movxo): Add comments about dense math registers.
(movxo_nodm): Rename from movxo and restrict the usage to machines
without dense math registers.
(movxo_dm): New insn for movxo support for machines with dense math
registers.
(mma_): Restrict usage to machines without dense math 
registers.
(mma_xxsetaccz): Add a define_expand wrapper, and add support for 
dense
math registers.
(mma_dmsetaccz): New insn.
* config/rs6000/predicates.md (dmr_operand): New predicate.
(accumulator_operand): Add support for dense math registers.
* config/rs6000/rs6000-builtin.cc (rs6000_gimple_fold_mma_builtin): 
Do
not issue a de-prime instruction when disassembling a vector quad 
on a
system with dense math registers.
* config/rs6000/rs6000-c.cc (rs6000_define_or_undefine_macro): 
Define
__DENSE_MATH__ if we have dense math registers.
* config/rs6000/rs6000.cc (enum rs6000_reg_type): Add DMR_REG_TYPE.
(enum rs6000_reload_reg_type): Add RELOAD_REG_DMR.
(LAST_RELOAD_REG_CLASS): Add support for DMR registers and the wD
constraint.
(reload_reg_map): Likewise.
(rs6000_reg_names): Likewise.
(alt_reg_names): Likewise.
(rs6000_hard_regno_nregs_internal): Likewise.
(rs6000_hard_regno_mode_ok_uncached): Likewise.
(rs6000_debug_reg_global): Likewise.
(rs6000_setup_reg_addr_masks): Likewise.
(rs6000_init_hard_regno_mode_ok): Likewise.
(rs6000_secondary_reload_memory): Add support for DMR registers.
(rs6000_secondary_reload_simple_move): Likewise.
(rs6000_preferred_reload_class): Likewise.
(rs6000_secondary_reload_class): Likewise.
(print_operand): Make %A handle both FPRs and DMRs.
  

[gcc(refs/users/meissner/heads/work165-dmf)] RFC2653-Add wD constraint.

2024-05-03 Thread Michael Meissner via Gcc-cvs
https://gcc.gnu.org/g:d2cb7b48c27f62f4508716ac9428f1466b0dd810

commit d2cb7b48c27f62f4508716ac9428f1466b0dd810
Author: Michael Meissner 
Date:   Fri May 3 20:13:14 2024 -0400

RFC2653-Add wD constraint.

This patch adds a new constraint ('wD') that matches the accumulator 
registers
that overlap with VSX registers 0..31 on power10.  Future patches will add 
the
support for a separate accumulator register class that will be used when the
support for dense math registes is added.

2024-04-08   Michael Meissner  

* config/rs6000/constraints.md (wD): New constraint.
* config/rs6000/mma.md (mma_): Prepare for alternate 
accumulator
registers.  Use wD constraint instead of 'd' constraint.  Use
accumulator_operand instead of fpr_reg_operand.
(mma_): Likewise.
(mma_): Likewise.
(mma_): Likewise.
(mma_): Likewise.
(mma_): Likewise.
(mma_): Likewise.
(mma_): Likewise.
(mma_): Likewise.
(mma_): Likewise.
(mma_): Likewise.
(mma_): Likewise.
(mma_): Likewise.
(mma_"
-  [(set (match_operand:XO 0 "fpr_reg_operand" "=")
-   (unspec:XO [(match_operand:XO 1 "fpr_reg_operand" "0")]
+  [(set (match_operand:XO 0 "accumulator_operand" "=")
+   (unspec:XO [(match_operand:XO 1 "accumulator_operand" "0")]
MMA_ACC))]
   "TARGET_MMA"
   " %A0"
@@ -523,7 +523,7 @@
   [(set_attr "type" "mma")])
 
 (define_insn "mma_"
-  [(set (match_operand:XO 0 "fpr_reg_operand" "=,")
+  [(set (match_operand:XO 0 "accumulator_operand" "=,")
(unspec:XO [(match_operand:V16QI 1 "vsx_register_operand" "v,?wa")
(match_operand:V16QI 2 "vsx_register_operand" "v,?wa")]
MMA_VV))]
@@ -532,8 +532,8 @@
   [(set_attr "type" "mma")])
 
 (define_insn "mma_"
-  [(set (match_operand:XO 0 "fpr_reg_operand" "=,")
-   (unspec:XO [(match_operand:XO 1 "fpr_reg_operand" "0,0")
+  [(set (match_operand:XO 0 "accumulator_operand" "=,")
+   (unspec:XO [(match_operand:XO 1 "accumulator_operand" "0,0")
(match_operand:V16QI 2 "vsx_register_operand" "v,?wa")
(match_operand:V16QI 3 "vsx_register_operand" "v,?wa")]
MMA_AVV))]
@@ -542,7 +542,7 @@
   [(set_attr "type" "mma")])
 
 (define_insn "mma_"
-  [(set (match_operand:XO 0 "fpr_reg_operand" "=,")
+  [(set (match_operand:XO 0 "accumulator_operand" "=,")
(unspec:XO [(match_operand:OO 1 "vsx_register_operand" "v,?wa")
(match_operand:V16QI 2 "vsx_register_operand" "v,?wa")]
MMA_PV))]
@@ -551,8 +551,8 @@
   [(set_attr "type" "mma")])
 
 (define_insn "mma_"
-  [(set (match_operand:XO 0 "fpr_reg_operand" "=,")
-   (unspec:XO [(match_operand:XO 1 "fpr_reg_operand" "0,0")
+  [(set (match_operand:XO 0 "accumulator_operand" "=,")
+   (unspec:XO [(match_operand:XO 1 "accumulator_operand" "0,0")
(match_operand:OO 2 "vsx_register_operand" "v,?wa")
(match_operand:V16QI 3 "vsx_register_operand" "v,?wa")]
MMA_APV))]
@@ -561,7 +561,7 @@
   [(set_attr "type" "mma")])
 
 (define_insn "mma_"
-  [(set (match_operand:XO 0 "fpr_reg_operand" "=,")
+  [(set (match_operand:XO 0 "accumulator_operand" "=,")
(unspec:XO [(match_operand:V16QI 1 "vsx_register_operand" "v,?wa")
(match_operand:V16QI 2 "vsx_register_operand" "v,?wa")
(match_operand:SI 3 "const_0_to_15_operand" "n,n")
@@ -574,8 +574,8 @@
(set_attr "prefixed" "yes")])
 
 (define_insn "mma_"
-  [(set (match_operand:XO 0 "fpr_reg_operand" "=,")
-   (unspec:XO [(match_operand:XO 1 "fpr_reg_operand" "0,0")
+  [(set (match_operand:XO 0 "accumulator_operand" "=,")
+   (unspec:XO [(match_operand:XO 1 "accumulator_operand" "0,0")
(match_operand:V16QI 2 "vsx_register_operand" "v,?wa")
(match_operand:V16QI 3 "vsx_register_operand" "v,?wa")
(match_operand:SI 4 "const_0_to_15_operand" "n,n")
@@ -588,7 +588,7 @@
(set_attr "prefixed" "yes")])
 
 (define_insn "mma_"
-  [(set (match_operand:XO 0 "fpr_reg_operand" "=,")
+  [(set (match_operand:XO 0 "accumulator_operand" "=,")
(unspec:XO [(match_operand:V16QI 1 "vsx_register_operand" "v,?wa")
(match_operand:V16QI 2 "vsx_register_operand" "v,?wa")
(match_operand:SI 3 "const_0_to_15_operand" "n,n")
@@ -601,8 +601,8 @@
(set_attr "prefixed" "yes")])
 
 (define_insn "mma_"
-  [(set (match_operand:XO 0 "fpr_reg_operand" "=,")
-   (unspec:XO [(match_operand:XO 1 "fpr_reg_operand" "0,0")
+  [(set (match_operand:XO 0 "accumulator_operand" "=,")
+   (unspec:XO [(match_operand:XO 1 "accumulator_operand" "0,0")
(match_operand:V16QI 2 "vsx_register_operand" "v,?wa")

Results for 15.0.0 20240503 (experimental) [remotes/origin/master r15-140-gb69dac54ef7] (GCC) testsuite on pru-unknown-elf

2024-05-03 Thread The GnuPru BuildBot via Gcc-testresults
 1
FAIL: gcc.dg/tree-ssa/ctz-complement-long.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-int.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-long.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  
[(char *)] = "
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  
[(char *)] = "
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  [(char *)] = "
FAIL: gcc.dg/tree-ssa/if-to-switch-1.c scan-tree-dump iftoswitch "Condition 
chain with [^\\n\\r]* BBs transformed into a switch statement."
FAIL: gcc.dg/tree-ssa/if-to-switch-10.c scan-tree-dump iftoswitch "Condition 
chain with [^\\n\\r]* BBs transformed into a switch statement."
FAIL: gcc.dg/tree-ssa/if-to-switch-3.c scan-tree-dump iftoswitch "Condition 
chain with [^\\n\\r]* BBs transformed into a switch statement."
FAIL: gcc.dg/tree-ssa/if-to-switch-9.c scan-tree-dump iftoswitch "Condition 
chain with [^\\n\\r]* BBs transformed into a switch statement."
FAIL: gcc.dg/tree-ssa/pr103281-1.c scan-tree-dump-not optimized "foo "
FAIL: gcc.dg/tree-ssa/ssa-dom-thread-7.c scan-tree-dump thread2 "Jumps 
threaded: 9"
FAIL: gcc.dg/tree-ssa/update-threading.c scan-tree-dump-times optimized 
"Invalid sum" 0
FAIL: outputs-22 exe savetmp namedb-2: outputs.ld1_args
FAIL: outputs-23 exe savetmp named2-2: outputs.ld1_args
FAIL: outputs-24 exe savetmp named2-3: outputs.ld1_args
FAIL: outputs-25 exe savetmp named2-4: outputs.ld1_args
FAIL: outputs-294 lto sing unnamed-3: a.ld1_args
FAIL: outputs-294 lto sing unnamed-3: a.ld_args

=== gcc Summary ===

# of expected passes133037
# of unexpected failures67
# of unexpected successes   2
# of expected failures  873
# of unresolved testcases   1
# of unsupported tests  4675
/home/dinux/projects/pru/testbot-workspace/pru-gcc-build/gcc/xgcc  version 
15.0.0 20240503 (experimental) [remotes/origin/master r15-140-gb69dac54ef7] 
(GCC) 

Host   is x86_64-pc-linux-gnu

=== g++ tests ===


Running target pru-sim
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++14  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++14  expected 
multiline pattern lines 49-64
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++14 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++17  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++17  expected 
multiline pattern lines 49-64
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++17 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++20  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++20  expected 
multiline pattern lines 49-64
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++20 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++98  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++98  expected 
multiline pattern lines 49-64
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++98 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++14  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++14  expected 
multiline pattern lines 19-34
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++14 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++17  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++17  expected 
multiline pattern lines 19-34
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++17 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++20  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++20  expected 
multiline pattern lines 19-34
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++20 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++98  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++98  expected 
multiline pattern lines 19-34
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++98 (test for 
excess errors)
FAIL: c-c++-common/pr103798-2.c  -std=gnu++14  scan-assembler-not memchr
FAIL: c-c++-common/pr103798-2.c  -std=gnu++17  scan-assembler-not memchr
FAIL: c-c++-common/pr103798-2.c  -std=gnu++20  scan-assembler-not memchr
FAIL: c-c++-common/pr103798-2.c  -std=gnu++98  scan-assembl

[gcc(refs/users/meissner/heads/work165-dmf)] Use vector pair load/store for memcpy with -mcpu=future

2024-05-03 Thread Michael Meissner via Gcc-cvs
https://gcc.gnu.org/g:7b62e438a22c49786f703b3290e741def25a3a73

commit 7b62e438a22c49786f703b3290e741def25a3a73
Author: Michael Meissner 
Date:   Fri May 3 20:07:32 2024 -0400

Use vector pair load/store for memcpy with -mcpu=future

In the development for the power10 processor, GCC did not enable using the 
load
vector pair and store vector pair instructions when optimizing things like
memory copy.  This patch enables using those instructions if -mcpu=future is
used.

2024-05-03  Michael Meissner  

gcc/

* config/rs6000/rs6000-cpus.def (ISA_FUTURE_MASKS_SERVER): Enable 
using
load vector pair and store vector pair instructions for memory copy
operations.
(POWERPC_MASKS): Make the bit for enabling using load vector pair 
and
store vector pair operations set and reset when the PowerPC 
processor is
changed.

Diff:
---
 gcc/config/rs6000/rs6000-cpus.def | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gcc/config/rs6000/rs6000-cpus.def 
b/gcc/config/rs6000/rs6000-cpus.def
index d625dbeb91f..3604a6f0126 100644
--- a/gcc/config/rs6000/rs6000-cpus.def
+++ b/gcc/config/rs6000/rs6000-cpus.def
@@ -90,6 +90,7 @@
  | OPTION_MASK_POWER11)
 
 #define ISA_FUTURE_MASKS_SERVER(ISA_POWER11_MASKS_SERVER   
\
+| OPTION_MASK_BLOCK_OPS_VECTOR_PAIR\
 | OPTION_MASK_FUTURE)
 
 /* Flags that need to be turned off if -mno-vsx.  */
@@ -120,6 +121,7 @@
 
 /* Mask of all options to set the default isa flags based on -mcpu=.  */
 #define POWERPC_MASKS  (OPTION_MASK_ALTIVEC\
+| OPTION_MASK_BLOCK_OPS_VECTOR_PAIR\
 | OPTION_MASK_CMPB \
 | OPTION_MASK_CRYPTO   \
 | OPTION_MASK_DFP  \


Results for 15.0.0 20240503 (experimental) [master r15-140-gb69dac54ef] (GCC) testsuite on powerpc64-unknown-linux-gnu

2024-05-03 Thread Bill Seurer (POWER9 BE) via Gcc-testresults


git commit g:b69dac54ef769a33bcdca6de243c1b08e05c7881
gcc-descr r15-140-gb69dac54ef769a

power9 BE
Linux 6.7.12-powerpc64 ppc64
GNU Make 4.3

DejaGnu:
DejaGnu version 1.6.3
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Fri May  3 23:17:26 UTC 2024 (revision r15-140-gb69dac54ef)

Native configuration is powerpc64-unknown-linux-gnu

=== g++ tests ===


Running target unix/-m32
FAIL: c-c++-common/torture/strub-run3.c   -O0  execution test

=== g++ Summary for unix/-m32 ===

# of expected passes251306
# of unexpected failures1
# of expected failures  2615
# of unsupported tests  11523

Running target unix/-m64

=== g++ Summary for unix/-m64 ===

# of expected passes260320
# of expected failures  2620
# of unsupported tests  11696

=== g++ Summary ===

# of expected passes511626
# of unexpected failures1
# of expected failures  5235
# of unsupported tests  23219
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xg++  version 15.0.0 20240503 
(experimental) [master r15-140-gb69dac54ef] (GCC) 

=== gcc tests ===


Running target unix/-m32
XPASS: gcc.dg/guality/example.c   -O0  execution test
XPASS: gcc.dg/guality/example.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/example.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O0  execution test
XPASS: gcc.dg/guality/guality.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -Os  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/inline-params.c   -O2  -DPREVENT_OPTIMIZATION  execution 
test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O3 -g  -DPREVENT_OPTIMIZATION  
execution test
XPASS: gcc.dg/guality/inline-params.c   -Os  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/loop-1.c   -O2  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg1 == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg2 == 2
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg3 == 3
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg4 == 4
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg5 == 5
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg6 == 6
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg7 == 30
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg1 == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg2 == 2
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg3 == 3
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg4 == 4
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg5 == 5
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg6 == 6
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker

[no subject]

2024-05-03 Thread บุญช่วย รวยดี via Gcc-bugs
สัมหรับเจ้าของกิจการ ที่มี Project เพื่อต่อยอดเพิ่มกำไรให้ธุรกิจ
แต่ยังหาทุนทรัพย์ไม่ทัน (เราช่วยคุณได้)
✔️สัมหรับเจ้าของธุรกิจที่มีการจดทะเบียน ใบประกอบกิจการ
✔️เรายินดีอนุมัติเงินด่วน 30,000-5,000,000 บ.
✔️ไม่เช็คเครดิต บูโรเอกสารไม่ยุ่งยาก ไม่ต้องมีบุคคลค้ำประกัน
✔️อัตราดอกเบี้ยเริ่มต้นที่ 1.5% ตัดต้นลดดอกเบี้ยทันที
✔️อนุมัติไวภายใน 1 วัน (หลังส่งเอกสารครบถ้วน)
ถ้าท่านสนใจบริการของเรา โทรด่วนหาเรา
☎️ 083-4968834 คุณเอก
 LINE ID : esc.credit
(ให้เราเป็นส่วนหนึ่งในครอบครับท่านนะครับ)


Results for 15.0.0 20240503 (experimental) [remotes/origin/HEAD r15-139-g04f24e44fb] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-05-03 Thread Bill Seurer (POWER9 IEEE128) via Gcc-testresults
/torture/pr52451.c   -O1  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr52451.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr52451.c   -Os  execution test
FAIL: gcc.dg/tree-ssa/abs-4.c scan-tree-dump-times optimized "= -" 1
FAIL: gcc.dg/tree-ssa/abs-4.c scan-tree-dump-times optimized "= .COPYSIGN" 2
FAIL: gcc.dg/tree-ssa/abs-4.c scan-tree-dump-times optimized "= ABS_EXPR" 1
FAIL: gcc.dg/tree-ssa/backprop-6.c scan-tree-dump-times backprop 
"Deleting[^n]* = -" 4
FAIL: gcc.dg/tree-ssa/backprop-6.c scan-tree-dump-times backprop 
"Deleting[^n]* = ABS_EXPR <" 1
FAIL: gcc.dg/tree-ssa/backprop-6.c scan-tree-dump-times backprop 
"Deleting[^n]* = .COPYSIGN" 2
XPASS: gcc.dg/tree-ssa/ssa-dom-cse-2.c scan-tree-dump optimized "return 28;"
FAIL: gcc.dg/tree-ssa/update-threading.c scan-tree-dump-times optimized 
"Invalid sum" 0
FAIL: gcc.dg/vect/vect-117.c -flto -ffat-lto-objects  scan-tree-dump-not 
optimized "Invalid sum"
FAIL: gcc.dg/vect/vect-117.c scan-tree-dump-not optimized "Invalid sum"
FAIL: gcc.target/powerpc/pr105334.c (test for excess errors)
FAIL: gcc.target/powerpc/rlwimi-2.c scan-assembler-times (?n)^s+[a-z] 20217
XPASS: gcc.target/powerpc/ppc-fortran/ieee128-math.f90   -O  (test for excess 
errors)

=== gcc Summary ===

# of expected passes179482
# of unexpected failures90
# of unexpected successes   20
# of expected failures  1619
# of unsupported tests  4251
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xgcc  version 15.0.0 20240503 
(experimental) [remotes/origin/HEAD r15-139-g04f24e44fb] (GCC) 

=== gfortran tests ===


Running target unix
XPASS: gfortran.dg/default_format_2.f90   -O0  execution test
XPASS: gfortran.dg/default_format_2.f90   -O1  execution test
XPASS: gfortran.dg/default_format_2.f90   -O2  execution test
XPASS: gfortran.dg/default_format_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/default_format_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/default_format_2.f90   -Os  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O0  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O1  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O2  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -Os  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O0  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O1  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O2  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -Os  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O0  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O1  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O2  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O3 -g  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -Os  execution test

=== gfortran Summary ===

# of expected passes69847
# of unexpected failures6
# of unexpected successes   18
# of expected failures  273
# of unsupported tests  177
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/gfortran  version 15.0.0 
20240503 (experimental) [remotes/origin/HEAD r15-139-g04f24e44fb] (GCC) 

=== g++ tests ===


Running target unix

=== g++ Summary ===

# of expected passes260366
# of expected failures  2620
# of unsupported tests  11688
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xg++  version 15.0.0 20240503 
(experimental) [remotes/origin/HEAD r15-139-g04f24e44fb] (GCC) 

=== obj-c++ tests ===


Running target unix

=== obj-c++ Summary ===

# of expected passes1503
# of expected failures  10
# of unsupported tests  79
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xg++  version 15.0.0 20240503 
(experimental) [re

Results for 15.0.0 20240503 (experimental) [master revision gcc-15-140-gb69dac54ef7] (GCC) testsuite on arm-unknown-eabi

2024-05-03 Thread ci_notify--- via Gcc-testresults
-function-bodies enumNonsecure0
UNRESOLVED: gcc.target/arm/cmse/extend-return.c   -O3 -g   
check-function-bodies shortSignNonsecure0
UNRESOLVED: gcc.target/arm/cmse/extend-return.c   -O3 -g   
check-function-bodies shortUnsignNonsecure0
UNRESOLVED: gcc.target/arm/cmse/extend-return.c   -O3 -g   
check-function-bodies signNonsecure0
UNRESOLVED: gcc.target/arm/cmse/extend-return.c   -O3 -g   
check-function-bodies unsignNonsecure0
FAIL: gcc.target/arm/cmse/extend-return.c   -O3 -g  (internal compiler error: 
in extract_insn, at recog.cc:2812)
FAIL: gcc.target/arm/cmse/extend-return.c   -O3 -g  (test for excess errors)
UNRESOLVED: gcc.target/arm/cmse/extend-return.c   -Os   check-function-bodies 
boolNonsecure0
UNRESOLVED: gcc.target/arm/cmse/extend-return.c   -Os   check-function-bodies 
enumNonsecure0
UNRESOLVED: gcc.target/arm/cmse/extend-return.c   -Os   check-function-bodies 
shortSignNonsecure0
UNRESOLVED: gcc.target/arm/cmse/extend-return.c   -Os   check-function-bodies 
shortUnsignNonsecure0
UNRESOLVED: gcc.target/arm/cmse/extend-return.c   -Os   check-function-bodies 
signNonsecure0
UNRESOLVED: gcc.target/arm/cmse/extend-return.c   -Os   check-function-bodies 
unsignNonsecure0
FAIL: gcc.target/arm/cmse/extend-return.c   -Os  (internal compiler error: in 
extract_insn, at recog.cc:2812)
FAIL: gcc.target/arm/cmse/extend-return.c   -Os  (test for excess errors)
FAIL: gcc.target/arm/mve/intrinsics/pr97327.c (test for excess errors)

=== gcc Summary ===

# of expected passes154182
# of unexpected failures178
# of unexpected successes   3
# of expected failures  901
# of unresolved testcases   58
# of unsupported tests  5211
/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu/bin/arm-eabi-gcc
  version 15.0.0 20240503 (experimental) [master revision 
gcc-15-140-gb69dac54ef7] (GCC) 

Host   is x86_64-pc-linux-gnu

=== g++ tests ===


Running target 
qemu/-mthumb/-march=armv8-m.base/-mtune=cortex-m23/-mfloat-abi=soft/-mfpu=auto
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++14  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++14  expected 
multiline pattern lines 49-64
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++14 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++17  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++17  expected 
multiline pattern lines 49-64
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++17 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++20  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++20  expected 
multiline pattern lines 49-64
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++20 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++98  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++98  expected 
multiline pattern lines 49-64
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++98 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++14  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++14  expected 
multiline pattern lines 19-34
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++14 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++17  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++17  expected 
multiline pattern lines 19-34
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++17 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++20  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++20  expected 
multiline pattern lines 19-34
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++20 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++98  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++98  expected 
multiline pattern lines 19-34
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++98 (test for 
excess errors)
FAIL: g++.dg/cpp2a/decomp2.C  -std=gnu++14 (test for excess errors)
UNRESOLVED: g++.dg/cpp2a/decomp2.C  -std=gnu++14 compilation failed to produce 
executable
FAIL: g++.dg/cpp2a/decomp2.C  -std=gnu++17 (test for excess errors)
UNRESOLVED: g++.dg/cpp2a/decomp2.C  -std=gnu++17 compilation failed to produce 
executable
FAIL: g++.dg/cpp2a/decomp2.C  -std=gnu++20 (test for excess errors)
UNRESOLVED: g++.dg/cpp2a/decomp2.C  -std=gnu++20 compilation failed to produce 
executable
FAIL: g++.dg/opt/pr97315-1.C  -std=gnu++14 (test for excess errors)
FAIL: g++.dg/opt/pr97315-1.C  -st

Regressions on native/releases/gcc-14 at commit r14-10164 vs commit r14-10159 on Linux/x86_64

2024-05-03 Thread Haochen Jiang via Gcc-regression
Regressions on releases/gcc-14 at commit r14-10164 vs commit r14-10159 on 
Linux/x86_64
New failures:
FAIL: gcc.dg/vect/tsvc/vect-tsvc-s317.c execution test
FAIL: gcc.dg/vect/tsvc/vect-tsvc-s317.c -flto -ffat-lto-objects execution test
FAIL: libgomp.c/examples-4/teams-4.c execution test
FAIL: libgomp.c++/../libgomp.c-c++-common/for-11.c execution test
FAIL: libgomp.c/../libgomp.c-c++-common/for-11.c execution test
FAIL: libgomp.c++/../libgomp.c-c++-common/for-12.c execution test
FAIL: libgomp.c++/../libgomp.c-c++-common/for-3.c execution test
FAIL: libgomp.c/../libgomp.c-c++-common/for-3.c execution test
FAIL: libgomp.c++/../libgomp.c-c++-common/for-5.c execution test
FAIL: libgomp.c/../libgomp.c-c++-common/for-5.c execution test
FAIL: libgomp.c++/../libgomp.c-c++-common/for-6.c execution test
FAIL: libgomp.c/../libgomp.c-c++-common/for-6.c execution test
FAIL: libgomp.c++/../libgomp.c-c++-common/for-9.c execution test

New passes:


Re: [wwwdocs] Porting-to-14: Mention new pragma GCC Target behavior

2024-05-03 Thread Gerald Pfeifer
On Thu, 2 May 2024, Martin Jambor wrote:
> Thanks for your suggestions, this is what I am going to commit in a
> moment.

Thanks!

> diff --git a/htdocs/gcc-14/porting_to.html b/htdocs/gcc-14/porting_to.html
>  
> +Pragma GCC target now affects preprocessor 
> symbols

A small detail I missed:  closed by  :-)  I'll fix this in a 
second.

> +
> +The behavior of pragma GCC target and specifically how it affects ISA
> +macros has changed in GCC 14.  In GCC 13 and older, the GCC
> +target pragma defined and undefined corresponding ISA macros in
> +C when using the integrated preprocessor during compilation but not
> +when the preprocessor was invoked as a separate step or when using
> +the -save-temps option.  In C++ the ISA macro definitions
> +were performed in a way which did not have any actual effect.
> +
> +In GCC 14 C++ behaves like C with integrated preprocessing in earlier
> +versions. Moreover, in both languages ISA macros are defined and
> +undefined as expected when preprocessing separately from compilation.

I assume this should be two paragraphs? I'll make this change and some 
other tweaks.

Gerald


[pushed] wwwdocs: gcc-14: Close as such, not

2024-05-03 Thread Gerald Pfeifer
Pushed.

Gerald

---
 htdocs/gcc-14/porting_to.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/htdocs/gcc-14/porting_to.html b/htdocs/gcc-14/porting_to.html
index a20d82c2..13772080 100644
--- a/htdocs/gcc-14/porting_to.html
+++ b/htdocs/gcc-14/porting_to.html
@@ -514,7 +514,7 @@ be included explicitly when compiling with GCC 14:
 
 
 
-Pragma GCC target now affects preprocessor symbols
+Pragma GCC target now affects preprocessor symbols
 
 
 The behavior of pragma GCC target and specifically how it affects ISA
-- 
2.44.0


gcc-wwwdocs branch master updated. 081ae01843bf8ed25ab7135123ab21d817db8fa9

2024-05-03 Thread Gerald Pfeifer via Gcc-cvs-wwwdocs
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gcc-wwwdocs".

The branch, master has been updated
   via  081ae01843bf8ed25ab7135123ab21d817db8fa9 (commit)
  from  ced576434ed310d0afee01d88d0c56f78b4d04c5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
commit 081ae01843bf8ed25ab7135123ab21d817db8fa9
Author: Gerald Pfeifer 
Date:   Sat May 4 01:29:35 2024 +0200

gcc-14: Close  as such, not 

diff --git a/htdocs/gcc-14/porting_to.html b/htdocs/gcc-14/porting_to.html
index a20d82c2..13772080 100644
--- a/htdocs/gcc-14/porting_to.html
+++ b/htdocs/gcc-14/porting_to.html
@@ -514,7 +514,7 @@ be included explicitly when compiling with GCC 14:
 
 
 
-Pragma GCC target now affects preprocessor symbols
+Pragma GCC target now affects preprocessor symbols
 
 
 The behavior of pragma GCC target and specifically how it affects ISA

---

Summary of changes:
 htdocs/gcc-14/porting_to.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
gcc-wwwdocs


Regressions on native/releases/gcc-13 at commit r13-8684 vs commit r13-8676 on Linux/x86_64

2024-05-03 Thread Haochen Jiang via Gcc-regression
Regressions on releases/gcc-13 at commit r13-8684 vs commit r13-8676 on 
Linux/x86_64
New failures:
FAIL: libgomp.c++/../libgomp.c-c++-common/for-12.c execution test
FAIL: libgomp.c++/../libgomp.c-c++-common/for-5.c execution test
FAIL: libgomp.c++/../libgomp.c-c++-common/for-5.c execution test

New passes:
FAIL: libgomp.c/../libgomp.c-c++-common/for-11.c execution test
FAIL: libgomp.c/../libgomp.c-c++-common/for-12.c execution test
FAIL: libgomp.c/../libgomp.c-c++-common/for-14.c execution test
FAIL: libgomp.c/../libgomp.c-c++-common/for-15.c execution test
FAIL: libgomp.c/../libgomp.c-c++-common/for-9.c execution test


Results for 15.0.0 20240503 (experimental) [master r15-138-g8f3afb83c8] (GCC) testsuite on powerpc64-unknown-linux-gnu

2024-05-03 Thread Bill Seurer (POWER9 BE) via Gcc-testresults


git commit g:8f3afb83c879f1bfa722a963a07c06aaf174ef72
gcc-descr r15-138-g8f3afb83c879f1

power9 BE
Linux 6.7.12-powerpc64 ppc64
GNU Make 4.3

DejaGnu:
DejaGnu version 1.6.3
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Fri May  3 21:24:30 UTC 2024 (revision r15-138-g8f3afb83c8)

Native configuration is powerpc64-unknown-linux-gnu

=== g++ tests ===


Running target unix/-m32
FAIL: c-c++-common/torture/strub-run3.c   -O0  execution test

=== g++ Summary for unix/-m32 ===

# of expected passes251306
# of unexpected failures1
# of expected failures  2615
# of unsupported tests  11523

Running target unix/-m64

=== g++ Summary for unix/-m64 ===

# of expected passes260320
# of expected failures  2620
# of unsupported tests  11696

=== g++ Summary ===

# of expected passes511626
# of unexpected failures1
# of expected failures  5235
# of unsupported tests  23219
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xg++  version 15.0.0 20240503 
(experimental) [master r15-138-g8f3afb83c8] (GCC) 

=== gcc tests ===


Running target unix/-m32
XPASS: gcc.dg/guality/example.c   -O0  execution test
XPASS: gcc.dg/guality/example.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/example.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O0  execution test
XPASS: gcc.dg/guality/guality.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -Os  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/inline-params.c   -O2  -DPREVENT_OPTIMIZATION  execution 
test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O3 -g  -DPREVENT_OPTIMIZATION  
execution test
XPASS: gcc.dg/guality/inline-params.c   -Os  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/loop-1.c   -O2  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg1 == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg2 == 2
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg3 == 3
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg4 == 4
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg5 == 5
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg6 == 6
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg7 == 30
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg1 == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg2 == 2
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg3 == 3
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg4 == 4
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg5 == 5
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg6 == 6
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker

Results for 15.0.0 20240503 (experimental) [remotes/origin/HEAD r15-138-g8f3afb83c8] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-05-03 Thread Bill Seurer (POWER8) via Gcc-testresults
-partition=none  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr68860-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr68860-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 y == 
2
FAIL: gcc.dg/guality/pr68860-1.c   -Os  -DPREVENT_OPTIMIZATION  line 16 y == 2
FAIL: gcc.dg/guality/pr68860-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr68860-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 y == 
2
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 21 a.i == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 21 a.j == 14
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 32 a[0] == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 32 a[1] == 14
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 43 a.i == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 43 a.j == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 21 a.i == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 21 a.j == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 32 a[0] == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 32 a[1] == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 43 a.i == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 43 a.j == 14
FAIL: gcc.dg/guality/vla-1.c   -O2  -DPREVENT_OPTIMIZATION  line 17 sizeof (a) 
== 6
FAIL: gcc.dg/guality/vla-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 17 sizeof (a) == 6
FAIL: gcc.dg/guality/vla-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 17 sizeof (a) == 6
FAIL: gcc.dg/guality/vla-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 17 sizeof 
(a) == 6
FAIL: gcc.dg/guality/vla-1.c   -Os  -DPREVENT_OPTIMIZATION  line 17 sizeof (a) 
== 6
FAIL: gcc.dg/torture/pr52451.c   -O0  execution test
FAIL: gcc.dg/torture/pr52451.c   -O1  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr52451.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr52451.c   -Os  execution test
XPASS: gcc.dg/tree-ssa/ssa-dom-cse-2.c scan-tree-dump optimized "return 28;"
FAIL: gcc.dg/tree-ssa/update-threading.c scan-tree-dump-times optimized 
"Invalid sum" 0
FAIL: gcc.dg/vect/vect-117.c -flto -ffat-lto-objects  scan-tree-dump-not 
optimized "Invalid sum"
FAIL: gcc.dg/vect/vect-117.c scan-tree-dump-not optimized "Invalid sum"
FAIL: gcc.target/powerpc/rlwimi-2.c scan-assembler-times (?n)^s+[a-z] 20217
XPASS: gcc.target/powerpc/ppc-fortran/ieee128-math.f90   -O  (test for excess 
errors)

=== gcc Summary ===

# of expected passes178463
# of unexpected failures121
# of unexpected successes   13
# of expected failures  1602
# of unsupported tests  5035
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xgcc  version 15.0.0 20240503 
(experimental) [remotes/origin/HEAD r15-138-g8f3afb83c8] (GCC) 

=== gfortran tests ===


Running target unix
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O0  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O1  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O2  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -Os  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O0  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O1  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O2  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O3 -g  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -Os  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O0  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O1  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O2  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  execution test
FAI

gcc-wwwdocs branch master updated. ced576434ed310d0afee01d88d0c56f78b4d04c5

2024-05-03 Thread Jonathan Wakely via Gcc-cvs-wwwdocs
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gcc-wwwdocs".

The branch, master has been updated
   via  ced576434ed310d0afee01d88d0c56f78b4d04c5 (commit)
  from  d63b0ce2968ddaa335a679ba4595ca582ef76d6d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -
commit ced576434ed310d0afee01d88d0c56f78b4d04c5
Author: Jonathan Wakely 
Date:   Fri May 3 16:04:49 2024 +0100

Add caveat to GCC 14 release notes about C warnings-as-errors change

diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html
index 46a0266d..82906de1 100644
--- a/htdocs/gcc-14/changes.html
+++ b/htdocs/gcc-14/changes.html
@@ -40,6 +40,11 @@ a work-in-progress.
   https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wflex-array-member-not-at-end;>-Wflex-array-member-not-at-end
 to
   identify all such cases in the source code and modify them.
   
+  C:
+  Certain warnings about are now errors, see
+  Porting to GCC 14
+  for details.
+  
   https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html;>-fcf-protection=[full|branch|return|none|check]
   is refactored, to override -fcf-protection,
   -fcf-protection=none needs to be added and then

---

Summary of changes:
 htdocs/gcc-14/changes.html | 5 +
 1 file changed, 5 insertions(+)


hooks/post-receive
-- 
gcc-wwwdocs


Results for 15.0.0 20240503 (experimental) [master revision gcc-15-137-gc943d7b5c40] (GCC) testsuite on aarch64-unknown-linux-gnu

2024-05-03 Thread ci_notify--- via Gcc-testresults
vc-vsumr.c execution test
FAIL: gcc.misc-tests/gcov-pr94029.c gcov failed: spawn failed
FAIL: gcc.target/aarch64/sve/mask_struct_load_3_run.c execution test

=== gcc Summary ===

# of expected passes339333
# of unexpected failures306
# of expected failures  1765
# of unsupported tests  4180
/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu/bin/aarch64-linux-gnu-gcc
  version 15.0.0 20240503 (experimental) [master revision 
gcc-15-137-gc943d7b5c40] (GCC) 

Host   is x86_64-pc-linux-gnu

=== gfortran tests ===


Running target qemu
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O0  execution 
test
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O1  execution 
test
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O2  execution 
test
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O3 
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  
execution test
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -O3 -g  
execution test
FAIL: gfortran.dg/asan/pointer_assign_16.f90 -fsanitize=address  -Os  execution 
test
FAIL: gfortran.dg/asan/pr110415-2.f90 -fsanitize=address  -O0  execution test
FAIL: gfortran.dg/asan/pr110415-2.f90 -fsanitize=address  -O1  execution test
FAIL: gfortran.dg/asan/pr110415-2.f90 -fsanitize=address  -O2  execution test
FAIL: gfortran.dg/asan/pr110415-2.f90 -fsanitize=address  -O3 
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  
execution test
FAIL: gfortran.dg/asan/pr110415-2.f90 -fsanitize=address  -O3 -g  execution test
FAIL: gfortran.dg/asan/pr110415-2.f90 -fsanitize=address  -Os  execution test
FAIL: gfortran.dg/asan/pr110415-3.f90 -fsanitize=address  -O0  execution test
FAIL: gfortran.dg/asan/pr110415-3.f90 -fsanitize=address  -O1  execution test
FAIL: gfortran.dg/asan/pr110415-3.f90 -fsanitize=address  -O2  execution test
FAIL: gfortran.dg/asan/pr110415-3.f90 -fsanitize=address  -O3 
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  
execution test
FAIL: gfortran.dg/asan/pr110415-3.f90 -fsanitize=address  -O3 -g  execution test
FAIL: gfortran.dg/asan/pr110415-3.f90 -fsanitize=address  -Os  execution test
FAIL: gfortran.dg/matmul_15.f90   -O  execution test

=== gfortran Summary ===

# of expected passes69195
# of unexpected failures19
# of expected failures  263
# of unsupported tests  156
/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu/bin/aarch64-linux-gnu-gfortran
  version 15.0.0 20240503 (experimental) [master revision 
gcc-15-137-gc943d7b5c40] (GCC) 

Host   is x86_64-pc-linux-gnu

=== g++ tests ===


Running target qemu
FAIL: c-c++-common/asan/alloca_instruments_all_paddings.c   -O0  execution test
FAIL: c-c++-common/asan/alloca_instruments_all_paddings.c   -O1  execution test
FAIL: c-c++-common/asan/alloca_instruments_all_paddings.c   -O2  execution test
FAIL: c-c++-common/asan/alloca_instruments_all_paddings.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none  execution test
FAIL: c-c++-common/asan/alloca_instruments_all_paddings.c   -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects  execution test
FAIL: c-c++-common/asan/alloca_instruments_all_paddings.c   -O3 
-fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  
execution test
FAIL: c-c++-common/asan/alloca_instruments_all_paddings.c   -O3 -g  execution 
test
FAIL: c-c++-common/asan/alloca_instruments_all_paddings.c   -Os  execution test
FAIL: c-c++-common/asan/alloca_loop_unpoisoning.c   -O0  execution test
FAIL: c-c++-common/asan/alloca_loop_unpoisoning.c   -O1  execution test
FAIL: c-c++-common/asan/alloca_loop_unpoisoning.c   -O2  execution test
FAIL: c-c++-common/asan/alloca_loop_unpoisoning.c   -O2 -flto 
-fno-use-linker-plugin -flto-partition=none  execution test
FAIL: c-c++-common/asan/alloca_loop_unpoisoning.c   -O2 -flto 
-fuse-linker-plugin -fno-fat-lto-objects  execution test
FAIL: c-c++-common/asan/alloca_loop_unpoisoning.c   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: c-c++-common/asan/alloca_loop_unpoisoning.c   -O3 -g  execution test
FAIL: c-c++-common/asan/alloca_loop_unpoisoning.c   -Os  execution test
FAIL: c-c++-common/asan/alloca_safe_access.c   -O0  execution test
FAIL: c-c++-common/asan/alloca_safe_access.c   -O1  execution test
FAIL: c-c++-common/asan/alloca_safe_access.c   -O2  execution test
FAIL: c-c++-common/asan/alloca_safe_access.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: c-c++-common/asan/alloca_safe_access.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: c-c++-common/asan/alloca_safe_access.c   -O3 -g  execution test
FAIL: c-c++-common/asan/alloca_safe_access.c   -Os  exec

gcc-13-20240503 is now available

2024-05-03 Thread GCC Administrator via Gcc
Snapshot gcc-13-20240503 is now available on
  https://gcc.gnu.org/pub/gcc/snapshots/13-20240503/
and on various mirrors, see https://gcc.gnu.org/mirrors.html for details.

This snapshot has been generated from the GCC 13 git branch
with the following options: git://gcc.gnu.org/git/gcc.git branch 
releases/gcc-13 revision 704b15e277a8792ac4cd6008ee08bec4b047a3e6

You'll find:

 gcc-13-20240503.tar.xz   Complete GCC

  SHA256=1620c124aef30ea908602be5da804ce699d108320bf3e1078b094b78dd149b48
  SHA1=9700d832e4bf042574eba184c5c2e42b014f8120

Diffs from 13-20240426 are available in the diffs/ subdirectory.

When a particular snapshot is ready for public consumption the LATEST-13
link is updated and a message is sent to the gcc list.  Please do not use
a snapshot before it has been announced that way.


[Bug libbacktrace/114941] libbacktrace build is broken for FDPIC uclibc targets by r14-5173-g2b64e4a54042

2024-05-03 Thread ian at airs dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114941

Ian Lance Taylor  changed:

   What|Removed |Added

 CC||ian at airs dot com

--- Comment #2 from Ian Lance Taylor  ---
What is the correct way to get the address at which the shared library was
loaded when using FDPIC?

[Bug modula2/114929] for loop fails to iterate down to zero if a cardinal type (unsigned type) is used with a step of -1.

2024-05-03 Thread gaius at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114929

Gaius Mulley  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #7 from Gaius Mulley  ---
Closing now the patch has been applied and back ported.

Re: [PATCH 5/4] libbacktrace: improve getting debug information for loaded dlls

2024-05-03 Thread Ian Lance Taylor via Gcc
On Thu, May 2, 2024 at 12:23 PM Björn Schäpers  wrote:
>
> Am 28.04.2024 um 20:16 schrieb Ian Lance Taylor:
> >
> > Which of your other patches are still relevant?  Thanks.
> >
> only this one.

Thanks.  Committed.

Ian


Re: [PATCH 5/4] libbacktrace: improve getting debug information for loaded dlls

2024-05-03 Thread Ian Lance Taylor
On Thu, May 2, 2024 at 12:23 PM Björn Schäpers  wrote:
>
> Am 28.04.2024 um 20:16 schrieb Ian Lance Taylor:
> >
> > Which of your other patches are still relevant?  Thanks.
> >
> only this one.

Thanks.  Committed.

Ian


[gcc r15-140] libbacktrace: add DLLS as they are loaded

2024-05-03 Thread Ian Lance Taylor via Gcc-cvs
https://gcc.gnu.org/g:b69dac54ef769a33bcdca6de243c1b08e05c7881

commit r15-140-gb69dac54ef769a33bcdca6de243c1b08e05c7881
Author: Ian Lance Taylor 
Date:   Fri May 3 15:23:23 2024 -0700

libbacktrace: add DLLS as they are loaded

Patch from Björn Schäpers.

* pecoff.c (struct dll_notification_data): Define.
(LDR_DLL_NOTIFICATION): New typedef.
(LDR_REGISTER_FUNCTION): New typedef.
(struct dll_notification_context): Define.
(dll_notification): New static function.
(backtrace_initialize): Register DLL notification.

Diff:
---
 libbacktrace/pecoff.c | 106 ++
 1 file changed, 106 insertions(+)

diff --git a/libbacktrace/pecoff.c b/libbacktrace/pecoff.c
index 4f267841178..bbb59e26d7a 100644
--- a/libbacktrace/pecoff.c
+++ b/libbacktrace/pecoff.c
@@ -61,6 +61,34 @@ POSSIBILITY OF SUCH DAMAGE.  */
 #undef Module32Next
 #endif
 #endif
+
+#if defined(_ARM_)
+#define NTAPI
+#else
+#define NTAPI __stdcall
+#endif
+
+/* This is a simplified (but binary compatible) version of what Microsoft
+   defines in their documentation. */
+struct dll_notification_data
+{
+  ULONG reserved;
+  /* The name as UNICODE_STRING struct. */
+  PVOID full_dll_name;
+  PVOID base_dll_name;
+  PVOID dll_base;
+  ULONG size_of_image;
+};
+
+#define LDR_DLL_NOTIFICATION_REASON_LOADED 1
+
+typedef LONG NTSTATUS;
+typedef VOID CALLBACK (*LDR_DLL_NOTIFICATION)(ULONG,
+ struct dll_notification_data*,
+ PVOID);
+typedef NTSTATUS NTAPI (*LDR_REGISTER_FUNCTION)(ULONG,
+   LDR_DLL_NOTIFICATION, PVOID,
+   PVOID*);
 #endif
 
 /* Coff file header.  */
@@ -911,6 +939,53 @@ coff_add (struct backtrace_state *state, int descriptor,
   return 0;
 }
 
+#ifdef HAVE_WINDOWS_H
+struct dll_notification_context
+{
+  struct backtrace_state *state;
+  backtrace_error_callback error_callback;
+  void *data;
+};
+
+static VOID CALLBACK
+dll_notification (ULONG reason,
+ struct dll_notification_data *notification_data,
+ PVOID context)
+{
+  char module_name[MAX_PATH];
+  int descriptor;
+  struct dll_notification_context* dll_context =
+(struct dll_notification_context*) context;
+  struct backtrace_state *state = dll_context->state;
+  void *data = dll_context->data;
+  backtrace_error_callback error_callback = dll_context->data;
+  fileline fileline;
+  int found_sym;
+  int found_dwarf;
+  HMODULE module_handle;
+
+  if (reason != LDR_DLL_NOTIFICATION_REASON_LOADED)
+return;
+
+  if (!GetModuleHandleExW ((GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS
+   | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT),
+  (wchar_t*) notification_data->dll_base,
+  _handle))
+return;
+
+  if (!GetModuleFileNameA ((HMODULE) module_handle, module_name, MAX_PATH - 1))
+return;
+
+  descriptor = backtrace_open (module_name, error_callback, data, NULL);
+
+  if (descriptor < 0)
+return;
+
+  coff_add (state, descriptor, error_callback, data, , _sym,
+   _dwarf, (uintptr_t) module_handle);
+}
+#endif /* defined(HAVE_WINDOWS_H) */
+
 /* Initialize the backtrace data we need from an ELF executable.  At
the ELF level, all we need to do is find the debug info
sections.  */
@@ -933,6 +1008,8 @@ backtrace_initialize (struct backtrace_state *state,
 #endif
 
 #ifdef HAVE_WINDOWS_H
+  HMODULE nt_dll_handle;
+
   module_handle = (uintptr_t) GetModuleHandle (NULL);
 #endif
 
@@ -980,6 +1057,35 @@ backtrace_initialize (struct backtrace_state *state,
 }
 #endif
 
+#ifdef HAVE_WINDOWS_H
+  nt_dll_handle = GetModuleHandleW (L"ntdll.dll");
+  if (nt_dll_handle)
+{
+  LDR_REGISTER_FUNCTION register_func;
+  const char register_name[] = "LdrRegisterDllNotification";
+  register_func = (void*) GetProcAddress (nt_dll_handle,
+ register_name);
+
+  if (register_func)
+   {
+ PVOID cookie;
+ struct dll_notification_context *context
+   = backtrace_alloc (state,
+  sizeof (struct dll_notification_context),
+  error_callback, data);
+
+ if (context)
+   {
+ context->state = state;
+ context->data = data;
+ context->error_callback = error_callback;
+
+ register_func (0, _notification, context, );
+   }
+   }
+}
+#endif /* defined(HAVE_WINDOWS_H) */
+
   if (!state->threaded)
 {
   if (found_sym)


Results for 15.0.0 20240503 (experimental) [master r15-133-g467ca4a195e] (GCC) testsuite on s390x-ibm-linux-gnu default

2024-05-03 Thread stefansf--- via Gcc-testresults
mes \\tselgr(?:h|le)\\t 1
FAIL: gcc.target/s390/arch13/sel-1.c scan-assembler-times \\tselr(?:h|le)\\t 1
FAIL: gcc.target/s390/ifcvt-one-insn-bool.c scan-assembler lochinh\\t%r.?,1
FAIL: gcc.target/s390/ifcvt-one-insn-char.c scan-assembler locrnh\\t%r.?,%r.?
FAIL: gcc.target/s390/loc-1.c scan-assembler \\tlocghine\\t%r2,-1
FAIL: gcc.target/s390/loc-1.c scan-assembler \\tlocgrne\\t%r2,%r4
FAIL: gcc.target/s390/nobp-table-jump-inline-z10.c scan-assembler 
section\\t.s390_indirect_jump
FAIL: gcc.target/s390/nobp-table-jump-inline-z10.c scan-assembler-times exrl 1
FAIL: gcc.target/s390/nobp-table-jump-inline-z900.c scan-assembler 
section\\t.s390_indirect_jump
FAIL: gcc.target/s390/nobp-table-jump-inline-z900.c scan-assembler-times 
\\tex\\t 1
FAIL: gcc.target/s390/nobp-table-jump-z10.c scan-assembler 
section\\t.s390_indirect_jump
FAIL: gcc.target/s390/nobp-table-jump-z10.c scan-assembler-times exrl 1
FAIL: gcc.target/s390/nobp-table-jump-z900.c scan-assembler 
section\\t.s390_indirect_jump
FAIL: gcc.target/s390/nobp-table-jump-z900.c scan-assembler-times ex\\t 1
FAIL: gcc.target/s390/risbg-ll-1.c scan-assembler 
f42:\\n\\tsllg\\t%r2,%r2,63\\n\\tsrag\\t%r2,%r2,63\\n\\tllgcr\\t%r2,%r2
FAIL: gcc.target/s390/vector/align-1.c scan-assembler-times 
vl\\t%v[0-9]*,[0-9]*(%r[0-9]*),3\\n 1
FAIL: gcc.target/s390/vector/align-1.c scan-assembler-times 
vst\\t%v[0-9]*,[0-9]*(%r[0-9]*),3\\n 1
FAIL: gcc.target/s390/vector/vec-abi-vararg-1.c scan-assembler 
ld\\t%v[0-9]*,368(%r15)
FAIL: gcc.target/s390/vector/vec-abi-vararg-1.c scan-assembler 
ld\\t%v[0-9]*,392(%r15)
FAIL: gcc.target/s390/vector/vec-abi-vararg-1.c scan-assembler 
vl\\t%v[0-9]*,352(%r15)
FAIL: gcc.target/s390/vector/vec-abi-vararg-1.c scan-assembler 
vl\\t%v[0-9]*,376(%r15)
FAIL: gcc.target/s390/vector/vec-scalar-cmp-1.c scan-assembler 
eq:\\n[^:]*\\twfcdb\\t%v[0-9]*,%v[0-9]*\\n\\t[^:]+\\tlocghie\\t%r2,1
FAIL: gcc.target/s390/vector/vec-scalar-cmp-1.c scan-assembler 
ge:\\n[^:]*\\twfkdb\\t%v[0-9]*,%v[0-9]*\\n\\t[^:]+\\tlocghihe\\t%r2,1
FAIL: gcc.target/s390/vector/vec-scalar-cmp-1.c scan-assembler 
gt:\\n[^:]*\\twfkdb\\t%v[0-9]*,%v[0-9]*\\n\\t[^:]+\\tlocghih\\t%r2,1
FAIL: gcc.target/s390/vector/vec-scalar-cmp-1.c scan-assembler 
le:\\n[^:]*\\twfkdb\\t%v[0-9]*,%v[0-9]*\\n\\t[^:]+\\tlocghile\\t%r2,1
FAIL: gcc.target/s390/vector/vec-scalar-cmp-1.c scan-assembler 
lt:\\n[^:]*\\twfkdb\\t%v[0-9]*,%v[0-9]*\\n\\t[^:]+\\tlocghil\\t%r2,1
FAIL: gcc.target/s390/vector/vec-scalar-cmp-1.c scan-assembler 
ne:\\n[^:]*\\twfcdb\\t%v[0-9]*,%v[0-9]*\\n\\t[^:]+\\tlocghine\\t%r2,1

=== gcc Summary for unix/-m64 ===

# of expected passes180921
# of unexpected failures172
# of unexpected successes   17
# of expected failures  1468
# of unsupported tests  4302

=== gcc Summary ===

# of expected passes358736
# of unexpected failures372
# of unexpected successes   31
# of expected failures  2937
# of unsupported tests  9222
-default/gcc/xgcc  version 15.0.0 20240503 (experimental) [master 
r15-133-g467ca4a195e] (GCC) 

=== gdc tests ===


Running target unix/-m31
FAIL: gdc.test/runnable/sdtor.d -O2   execution test
FAIL: gdc.test/runnable/sdtor.d -O2 -finline-functions   execution test
FAIL: gdc.test/runnable/sdtor.d -O2 -finline-functions -frelease -funittest   
execution test
FAIL: gdc.test/runnable/sdtor.d -O2 -finline-functions -frelease -funittest -g  
 execution test
FAIL: gdc.test/runnable/sdtor.d -O2 -finline-functions -frelease -funittest -g 
-shared-libphobos   execution test
FAIL: gdc.test/runnable/sdtor.d -O2 -finline-functions -frelease -funittest 
-shared-libphobos   execution test
FAIL: gdc.test/runnable/sdtor.d -O2 -finline-functions -funittest   execution 
test
FAIL: gdc.test/runnable/sdtor.d -O2 -finline-functions -funittest -g   
execution test
FAIL: gdc.test/runnable/sdtor.d -O2 -finline-functions -funittest -g 
-shared-libphobos   execution test
FAIL: gdc.test/runnable/sdtor.d -O2 -finline-functions -funittest 
-shared-libphobos   execution test
FAIL: gdc.test/runnable/sdtor.d -O2 -finline-functions -g   execution test
FAIL: gdc.test/runnable/sdtor.d -O2 -finline-functions -g -shared-libphobos   
execution test
FAIL: gdc.test/runnable/sdtor.d -O2 -finline-functions -shared-libphobos   
execution test
FAIL: gdc.test/runnable/sdtor.d -O2 -frelease -funittest   execution test
FAIL: gdc.test/runnable/sdtor.d -O2 -frelease -funittest -g   execution test
FAIL: gdc.test/runnable/sdtor.d -O2 -frelease -funittest -g -shared-libphobos   
execution test
FAIL: gdc.test/runnable/sdtor.d -O2 -frelease -funittest -shared-libphobos   
execution test
FAIL: gdc.test/runnable/sdtor.d -O2 -funittest   execution test
FAIL: gdc.test/runnable/sdtor.d -O2 -funittest -g   execution test
FAIL: gdc.test/runnable/sdtor.d -O2 -funittest -g -shared-libphobos   execution 
test
FAIL: gdc.test/runnable/sdtor.d -O2 -funittest

[Bug target/114942] [14/15 Regression] ICE on valid code at -O1 with "-fno-tree-sra -fno-guess-branch-probability": in extract_constrain_insn, at recog.cc:2713

2024-05-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114942

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2024-05-03
   Target Milestone|--- |14.0
Summary|ICE on valid code at -O1|[14/15 Regression] ICE on
   |with "-fno-tree-sra |valid code at -O1 with
   |-fno-guess-branch-probabili |"-fno-tree-sra
   |ty": in |-fno-guess-branch-probabili
   |extract_constrain_insn, at  |ty": in
   |recog.cc:2713   |extract_constrain_insn, at
   ||recog.cc:2713
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
Version|unknown |15.0

--- Comment #1 from Andrew Pinski  ---
Confirmed. Looks like it was introduced with r14-5456-gb42a09b258c3ed .

[Bug rtl-optimization/114942] New: ICE on valid code at -O1 with "-fno-tree-sra -fno-guess-branch-probability": in extract_constrain_insn, at recog.cc:2713

2024-05-03 Thread zhendong.su at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114942

Bug ID: 114942
   Summary: ICE on valid code at -O1 with "-fno-tree-sra
-fno-guess-branch-probability": in
extract_constrain_insn, at recog.cc:2713
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zhendong.su at inf dot ethz.ch
  Target Milestone: ---

It appears to be a recent regression as it doesn't reproduce with 13.2 and
earlier.

Compiler Explorer: https://godbolt.org/z/av9hr4933

[648] % gcctk -v
Using built-in specs.
COLLECT_GCC=gcctk
COLLECT_LTO_WRAPPER=/local/suz-local/software/local/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc-trunk/configure --disable-bootstrap
--enable-checking=yes --prefix=/local/suz-local/software/local/gcc-trunk
--enable-sanitizers --enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240503 (experimental) (GCC)
[649] %
[649] % gcctk -O1 -c -fno-tree-sra -fno-guess-branch-probability small.c
small.c: In function ‘main’:
small.c:21:1: error: insn does not satisfy its constraints:
   21 | }
  | ^
(insn 39 56 57 6 (parallel [
(set (strict_low_part (reg:QI 2 cx [orig:108 f ] [108]))
(ior:QI (subreg:QI (zero_extract:HI (reg/v:HI 2 cx [orig:108 f
] [108])
(const_int 8 [0x8])
(const_int 8 [0x8])) 0)
(reg:QI 0 ax [orig:121 _7 ] [121])))
(clobber (reg:CC 17 flags))
]) "small.c":19:7 626 {*iorqi_exthi_1_slp}
 (nil))
during RTL pass: reload
small.c:21:1: internal compiler error: in extract_constrain_insn, at
recog.cc:2713
0x83dea6 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
../../gcc-trunk/gcc/rtl-error.cc:108
0x83ded2 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
../../gcc-trunk/gcc/rtl-error.cc:118
0x83c10c extract_constrain_insn(rtx_insn*)
../../gcc-trunk/gcc/recog.cc:2713
0xf55a67 check_rtl
../../gcc-trunk/gcc/lra.cc:2189
0xf5aef1 lra(_IO_FILE*, int)
../../gcc-trunk/gcc/lra.cc:2610
0xf0b1ff do_reload
../../gcc-trunk/gcc/ira.cc:5973
0xf0b1ff execute
../../gcc-trunk/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 <https://gcc.gnu.org/bugs/> for instructions.
[650] %
[650] % cat small.c
extern void a();
struct b {
  char c;
  char d;
} e;
int main() {
  struct b f = e;
  char i = 0;
 L1:
  if (!f.c)
goto L2;
  if (e.c)
a();
  else
return 0;
  f.d = 0;
  i = 1 % ((1 & f.c) - 2);
 L2:
  f.c = ~(i & ~f.d);
  goto L1;
}

[Bug middle-end/23872] .original dump weirdness

2024-05-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23872

--- Comment #12 from Andrew Pinski  ---
Note only the `;` issue has been resolved, the other 2 issues I have to rework.

Re: [PATCH 3/3] Add parentheses around DECL_INIT for .original [PR23872]

2024-05-03 Thread Andrew Pinski
On Fri, May 3, 2024 at 4:41 AM Richard Biener
 wrote:
>
> On Thu, May 2, 2024 at 11:40 PM Andrew Pinski  
> wrote:
> >
> > When we have :
> > `void f (int y, int z) { int x = ( z++,y); }`
> >
> > This would have printed the decl's initializer without
> > parentheses which can confusion if you think that is defining
> > another variable rather than the compound expression.
> >
> > This adds parenthese around DECL_INIT if it was a COMPOUND_EXPR.
>
> Looking it seems we'd hit a similar issue for
>
>  foo ((z++,y), 2);
>
> thus in CALL_EXPR context.  Also
>
> int k;
> void foo (int i, int j)
> {
>   k = (i, 2) + j;
> }
>
> dumps as
>
> {
>   k = i, j + 2;;
> }
>
> (ok that's folded to (i, j + 2) but still).
>
> So shouldn't we bite the bullet and wrap all COMPOUND_EXPRs in
> parens instead?  Possibly "tail-calling" the case of
> a, b, c in COMPOUND_EXPR dumping itself?

Let me look into that but it won't be until June due to other things going on.

Thanks,
Andrew

>
> Thanks,
> Richard.
>
> > Bootstrapped and tested on x86_64-linux-gnu.
> >
> > gcc/ChangeLog:
> >
> > * tree-pretty-print.cc (print_declaration): Add parenthese
> > around DECL_INIT if it was a COMPOUND_EXPR.
> >
> > Signed-off-by: Andrew Pinski 
> > ---
> >  gcc/tree-pretty-print.cc | 9 -
> >  1 file changed, 8 insertions(+), 1 deletion(-)
> >
> > diff --git a/gcc/tree-pretty-print.cc b/gcc/tree-pretty-print.cc
> > index 825ba74443b..8b766dcd2b8 100644
> > --- a/gcc/tree-pretty-print.cc
> > +++ b/gcc/tree-pretty-print.cc
> > @@ -4240,7 +4240,14 @@ print_declaration (pretty_printer *pp, tree t, int 
> > spc, dump_flags_t flags, bool
> >   pp_equal (pp);
> >   pp_space (pp);
> >   if (!(flags & TDF_SLIM))
> > -   dump_generic_node (pp, DECL_INITIAL (t), spc, flags, false);
> > +   {
> > + bool need_paren = TREE_CODE (DECL_INITIAL (t)) == 
> > COMPOUND_EXPR;
> > + if (need_paren)
> > +   pp_left_paren (pp);
> > + dump_generic_node (pp, DECL_INITIAL (t), spc, flags, false);
> > + if (need_paren)
> > +   pp_right_paren (pp);
> > +   }
> >   else
> > pp_string (pp, "<<< omitted >>>");
> > }
> > --
> > 2.43.0
> >


Re: [PATCH 2/3] Improve DECL_EXPR printing in .original [PR23872]

2024-05-03 Thread Andrew Pinski
On Fri, May 3, 2024 at 4:36 AM Richard Biener
 wrote:
>
> On Thu, May 2, 2024 at 11:40 PM Andrew Pinski  
> wrote:
> >
> > Right now we don't print that a DECL_EXPR and we get
> > basically double output of the decls and it looks confusing.
> > This fixes that.
> > for the simple example:
> > `void foo () { int result = 0;}`
> > This gives:
> > ```
> > {
> >   int result = 0;
> >
> >   DECL_EXPR;
> > }
> > ```
>
> Hmm, I think it would be better if it were
>
>   {
>
> int result = 0;
>   }
>
> so omit the dumping from the BLOCK_VARS(?) when the variable has a DECL_EXPR.
> That more easily lets us spot use-before-DECL_EXPR issues.

Yes, yes that would be definitely better. Let me see if I can figure
that out. I might not be able to get back to this until June though.

>
> So I don't think this patch is an improvement?

Ok, yes I agree.

Thanks,
Andrew

>
> Thanks,
> Richard.
>
> > Bootstrapped and tested on x86_64-linux-gnu with no regressions.
> >
> > gcc/ChangeLog:
> >
> > * tree-pretty-print.cc (dump_generic_node ): Print
> > out `DECL_EXPR<...>` around the decl and update the call to
> > print_declaration to pass false for new argument and pass 0
> > for the spacing.
> > (print_declaration): Add argument is_stmt and don't print
> > a semicolon nor the initializer.
> > * tree-pretty-print.h (print_declaration): Add bool argument
> > and default it to true.
> >
> > Signed-off-by: Andrew Pinski 
> > ---
> >  gcc/tree-pretty-print.cc | 18 +++---
> >  gcc/tree-pretty-print.h  |  2 +-
> >  2 files changed, 12 insertions(+), 8 deletions(-)
> >
> > diff --git a/gcc/tree-pretty-print.cc b/gcc/tree-pretty-print.cc
> > index f9ad8562078..825ba74443b 100644
> > --- a/gcc/tree-pretty-print.cc
> > +++ b/gcc/tree-pretty-print.cc
> > @@ -2917,8 +2917,9 @@ dump_generic_node (pretty_printer *pp, tree node, int 
> > spc, dump_flags_t flags,
> >break;
> >
> >  case DECL_EXPR:
> > -  print_declaration (pp, DECL_EXPR_DECL (node), spc, flags);
> > -  is_stmt = false;
> > +  pp_string (pp, "DECL_EXPR<");
> > +  print_declaration (pp, DECL_EXPR_DECL (node), 0, flags, false);
> > +  pp_greater (pp);
> >break;
> >
> >  case COND_EXPR:
> > @@ -4151,10 +4152,11 @@ dump_generic_node (pretty_printer *pp, tree node, 
> > int spc, dump_flags_t flags,
> >return spc;
> >  }
> >
> > -/* Print the declaration of a variable.  */
> > +/* Print the declaration of a variable, T to PP starting with SPC spaces 
> > with FLAGS
> > +   and called as IS_STMT a statement or not.  */
> >
> >  void
> > -print_declaration (pretty_printer *pp, tree t, int spc, dump_flags_t flags)
> > +print_declaration (pretty_printer *pp, tree t, int spc, dump_flags_t 
> > flags, bool is_stmt)
> >  {
> >INDENT (spc);
> >
> > @@ -4162,7 +4164,8 @@ print_declaration (pretty_printer *pp, tree t, int 
> > spc, dump_flags_t flags)
> >  {
> >pp_string(pp, "namelist ");
> >dump_decl_name (pp, t, flags);
> > -  pp_semicolon (pp);
> > +  if (is_stmt)
> > +   pp_semicolon (pp);
> >return;
> >  }
> >
> > @@ -4231,7 +4234,7 @@ print_declaration (pretty_printer *pp, tree t, int 
> > spc, dump_flags_t flags)
> >if (TREE_CODE (t) != FUNCTION_DECL)
> >  {
> >/* Print the initial value.  */
> > -  if (DECL_INITIAL (t))
> > +  if (DECL_INITIAL (t) && is_stmt)
> > {
> >   pp_space (pp);
> >   pp_equal (pp);
> > @@ -4250,7 +4253,8 @@ print_declaration (pretty_printer *pp, tree t, int 
> > spc, dump_flags_t flags)
> >pp_right_bracket (pp);
> >  }
> >
> > -  pp_semicolon (pp);
> > +  if (is_stmt)
> > +pp_semicolon (pp);
> >  }
> >
> >
> > diff --git a/gcc/tree-pretty-print.h b/gcc/tree-pretty-print.h
> > index 0da6242629b..660c17410a9 100644
> > --- a/gcc/tree-pretty-print.h
> > +++ b/gcc/tree-pretty-print.h
> > @@ -47,7 +47,7 @@ extern void dump_omp_loop_non_rect_expr (pretty_printer 
> > *, tree, int,
> >  dump_flags_t);
> >  extern void print_omp_context_selector (FILE *, tree, dump_flags_t);
> >  extern int dump_generic_node (pretty_printer *, tree, int, dump_flags_t, 
> > bool);
> > -extern void print_declaration (pretty_printer *, tree, int, dump_flags_t);
> > +extern void print_declaration (pretty_printer *, tree, int, dump_flags_t, 
> > bool = true);
> >  extern int op_code_prio (enum tree_code);
> >  extern int op_prio (const_tree);
> >  extern const char *op_symbol_code (enum tree_code, dump_flags_t = 
> > TDF_NONE);
> > --
> > 2.43.0
> >


[gcc r15-139] Fix printing COMPOUND_EXPR in .original [PR23872]

2024-05-03 Thread Andrew Pinski via Gcc-cvs
https://gcc.gnu.org/g:04f24e44fb14a22516444f70503719f3fda15d6c

commit r15-139-g04f24e44fb14a22516444f70503719f3fda15d6c
Author: Andrew Pinski 
Date:   Tue Apr 16 17:43:36 2024 -0700

Fix printing COMPOUND_EXPR in .original [PR23872]

Starting with the merge of the openmp branch into the trunk
(r0-73077-g953ff28998b59b), COMPOUND_EXPR started to be printed
as `expr; , expr` which is wrong. This was due to the wrong
conversion of dumping_stmts into `!(flags & TDF_SLIM)`. That is wrong
as we are not dumping stmts at this point (`!(flags & TDF_SLIM)` was always
true for this case as TDF_SLIM case was handled before hand). So switch it
to be always false.

Bootstrapped and tested on x86_64-linux-gnu with no regressions.

gcc/ChangeLog:

PR middle-end/23872
* tree-pretty-print.cc (dump_generic_node ): Fix
calls to dump_generic_node and also remove unreachable code that is 
testing
`flags & TDF_SLIM`.

gcc/testsuite/ChangeLog:

* gfortran.dg/gomp/atomic-21.f90: Update testcase for the removal 
of `;`.

Signed-off-by: Andrew Pinski 

Diff:
---
 gcc/testsuite/gfortran.dg/gomp/atomic-21.f90 |  4 ++--
 gcc/tree-pretty-print.cc | 24 +++-
 2 files changed, 9 insertions(+), 19 deletions(-)

diff --git a/gcc/testsuite/gfortran.dg/gomp/atomic-21.f90 
b/gcc/testsuite/gfortran.dg/gomp/atomic-21.f90
index febcdbbacfb..35099294d7a 100644
--- a/gcc/testsuite/gfortran.dg/gomp/atomic-21.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/atomic-21.f90
@@ -56,7 +56,7 @@ subroutine foobar()
 endif
 
 !  TARGET_EXPR  = #pragma omp atomic capture acq_rel
-!TARGET_EXPR  = NON_LVALUE_EXPR  = 
*TARGET_EXPR  == oo> ? pp : *TARGET_EXPR ;, if 
(TARGET_EXPR )
+!TARGET_EXPR  = NON_LVALUE_EXPR  = 
*TARGET_EXPR  == oo> ? pp : *TARGET_EXPR , if 
(TARGET_EXPR )
 !{
 !  <<< Unknown tree: void_cst >>>
 !}
@@ -66,7 +66,7 @@ subroutine foobar()
 !};
 !
 ! { dg-final { scan-tree-dump-times "TARGET_EXPR  = #pragma omp 
atomic capture acq_rel" 1 "original" } }
-! { dg-final { scan-tree-dump-times "TARGET_EXPR  = 
NON_LVALUE_EXPR  = \\*TARGET_EXPR  
== oo> \\? pp : \\*TARGET_EXPR ;, if \\(TARGET_EXPR 
\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "TARGET_EXPR  = 
NON_LVALUE_EXPR  = \\*TARGET_EXPR  
== oo> \\? pp : \\*TARGET_EXPR , if \\(TARGET_EXPR 
\\)" 1 "original" } }
 ! { dg-final { scan-tree-dump-times "<<< Unknown tree: void_cst >>>" 1 
"original" } }
 ! { dg-final { scan-tree-dump-times "qq = TARGET_EXPR ;" 1 
"original" } }
 
diff --git a/gcc/tree-pretty-print.cc b/gcc/tree-pretty-print.cc
index c935a7da7d1..f9ad8562078 100644
--- a/gcc/tree-pretty-print.cc
+++ b/gcc/tree-pretty-print.cc
@@ -2856,31 +2856,21 @@ dump_generic_node (pretty_printer *pp, tree node, int 
spc, dump_flags_t flags,
  }
 
dump_generic_node (pp, TREE_OPERAND (node, 0),
-  spc, flags, !(flags & TDF_SLIM));
-   if (flags & TDF_SLIM)
- newline_and_indent (pp, spc);
-   else
- {
-   pp_comma (pp);
-   pp_space (pp);
- }
+  spc, flags, false);
+   pp_comma (pp);
+   pp_space (pp);
 
for (tp = _OPERAND (node, 1);
 TREE_CODE (*tp) == COMPOUND_EXPR;
 tp = _OPERAND (*tp, 1))
  {
dump_generic_node (pp, TREE_OPERAND (*tp, 0),
-  spc, flags, !(flags & TDF_SLIM));
-   if (flags & TDF_SLIM)
- newline_and_indent (pp, spc);
-   else
- {
-   pp_comma (pp);
-   pp_space (pp);
- }
+  spc, flags, false);
+   pp_comma (pp);
+   pp_space (pp);
  }
 
-   dump_generic_node (pp, *tp, spc, flags, !(flags & TDF_SLIM));
+   dump_generic_node (pp, *tp, spc, flags, false);
   }
   break;


[Bug middle-end/23872] .original dump weirdness

2024-05-03 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23872

--- Comment #11 from GCC Commits  ---
The trunk branch has been updated by Andrew Pinski :

https://gcc.gnu.org/g:04f24e44fb14a22516444f70503719f3fda15d6c

commit r15-139-g04f24e44fb14a22516444f70503719f3fda15d6c
Author: Andrew Pinski 
Date:   Tue Apr 16 17:43:36 2024 -0700

Fix printing COMPOUND_EXPR in .original [PR23872]

Starting with the merge of the openmp branch into the trunk
(r0-73077-g953ff28998b59b), COMPOUND_EXPR started to be printed
as `expr; , expr` which is wrong. This was due to the wrong
conversion of dumping_stmts into `!(flags & TDF_SLIM)`. That is wrong
as we are not dumping stmts at this point (`!(flags & TDF_SLIM)` was always
true for this case as TDF_SLIM case was handled before hand). So switch it
to be always false.

Bootstrapped and tested on x86_64-linux-gnu with no regressions.

gcc/ChangeLog:

PR middle-end/23872
* tree-pretty-print.cc (dump_generic_node ):
Fix
calls to dump_generic_node and also remove unreachable code that is
testing
`flags & TDF_SLIM`.

gcc/testsuite/ChangeLog:

* gfortran.dg/gomp/atomic-21.f90: Update testcase for the removal
of `;`.

Signed-off-by: Andrew Pinski 

Results for 15.0.0 20240503 (experimental) [master revision gcc-15-138-g8f3afb83c87] (GCC) testsuite on armv8l-unknown-linux-gnueabihf

2024-05-03 Thread ci_notify--- via Gcc-testresults
s errors)
FAIL: gcc.target/arm/vect-early-break-cbranch.c check-function-bodies f1
FAIL: gcc.target/arm/vect-early-break-cbranch.c check-function-bodies f2
FAIL: gcc.target/arm/vect-early-break-cbranch.c check-function-bodies f3
FAIL: gcc.target/arm/vect-early-break-cbranch.c check-function-bodies f4
FAIL: gcc.target/arm/vect-early-break-cbranch.c check-function-bodies f5
FAIL: gcc.target/arm/vect-early-break-cbranch.c check-function-bodies f6
FAIL: gcc.target/arm/wmul-5.c scan-assembler umlal
FAIL: gcc.target/arm/wmul-6.c scan-assembler smlalbb
FAIL: gcc.target/arm/wmul-7.c scan-assembler umlal
FAIL: gcc.target/arm/simd/mve-vshr.c scan-assembler-times 
vneg.s[0-9]+tq[0-9]+, q[0-9]+ 6
FAIL: gcc.target/arm/simd/mve-vshr.c scan-assembler-times 
vshl.s[0-9]+tq[0-9]+, q[0-9]+ 3
FAIL: gcc.target/arm/simd/mve-vshr.c scan-assembler-times 
vshl.u[0-9]+tq[0-9]+, q[0-9]+ 3

=== gcc Summary ===

# of expected passes193138
# of unexpected failures201
# of unexpected successes   45
# of expected failures  1551
# of unsupported tests  6907
/home/tcwg-buildslave/workspace/tcwg_gnu_4/abe/builds/destdir/armv8l-unknown-linux-gnueabihf/bin/armv8l-unknown-linux-gnueabihf-gcc
  version 15.0.0 20240503 (experimental) [master revision 
gcc-15-138-g8f3afb83c87] (GCC) 

=== gfortran tests ===


Running target tcwg-local
FAIL: gfortran.dg/ieee/comparisons_3.F90   -Os  execution test

=== gfortran Summary ===

# of expected passes68443
# of unexpected failures1
# of expected failures  265
# of unsupported tests  528
/home/tcwg-buildslave/workspace/tcwg_gnu_4/abe/builds/destdir/armv8l-unknown-linux-gnueabihf/bin/armv8l-unknown-linux-gnueabihf-gfortran
  version 15.0.0 20240503 (experimental) [master revision 
gcc-15-138-g8f3afb83c87] (GCC) 

=== g++ tests ===


Running target tcwg-local
FAIL: g++.dg/guality/pr55665.C   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  line 23 p == 40
XPASS: g++.target/arm/bfloat_cpp_typecheck.C  (test for bogus messages, line 10)
XPASS: g++.target/arm/bfloat_cpp_typecheck.C  (test for bogus messages, line 11)

=== g++ Summary ===

# of expected passes266314
# of unexpected failures1
# of unexpected successes   2
# of expected failures  2789
# of unsupported tests  11781
/home/tcwg-buildslave/workspace/tcwg_gnu_4/abe/builds/destdir/armv8l-unknown-linux-gnueabihf/bin/armv8l-unknown-linux-gnueabihf-g++
  version 15.0.0 20240503 (experimental) [master revision 
gcc-15-138-g8f3afb83c87] (GCC) 

=== objc tests ===


Running target tcwg-local

=== objc Summary ===

# of expected passes2846
# of unsupported tests  70
/home/tcwg-buildslave/workspace/tcwg_gnu_4/abe/builds/destdir/armv8l-unknown-linux-gnueabihf/bin/armv8l-unknown-linux-gnueabihf-gcc
  version 15.0.0 20240503 (experimental) [master revision 
gcc-15-138-g8f3afb83c87] (GCC) 


Compiler version: 15.0.0 20240503 (experimental) [master revision 
gcc-15-138-g8f3afb83c87] (GCC) 
Platform: armv8l-unknown-linux-gnueabihf
configure flags: SHELL=/bin/bash 
--with-mpc=/home/tcwg-buildslave/workspace/tcwg_gnu_4/abe/builds/destdir/armv8l-unknown-linux-gnueabihf
 
--with-mpfr=/home/tcwg-buildslave/workspace/tcwg_gnu_4/abe/builds/destdir/armv8l-unknown-linux-gnueabihf
 
--with-gmp=/home/tcwg-buildslave/workspace/tcwg_gnu_4/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_4/abe/builds/destdir/armv8l-unknown-linux-gnueabihf


Results for 15.0.0 20240503 (experimental) [remotes/origin/HEAD r15-138-g8f3afb83c8] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-05-03 Thread Bill Seurer (POWER9 IEEE128) via Gcc-testresults
/torture/pr52451.c   -O1  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr52451.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr52451.c   -Os  execution test
FAIL: gcc.dg/tree-ssa/abs-4.c scan-tree-dump-times optimized "= -" 1
FAIL: gcc.dg/tree-ssa/abs-4.c scan-tree-dump-times optimized "= .COPYSIGN" 2
FAIL: gcc.dg/tree-ssa/abs-4.c scan-tree-dump-times optimized "= ABS_EXPR" 1
FAIL: gcc.dg/tree-ssa/backprop-6.c scan-tree-dump-times backprop 
"Deleting[^n]* = -" 4
FAIL: gcc.dg/tree-ssa/backprop-6.c scan-tree-dump-times backprop 
"Deleting[^n]* = ABS_EXPR <" 1
FAIL: gcc.dg/tree-ssa/backprop-6.c scan-tree-dump-times backprop 
"Deleting[^n]* = .COPYSIGN" 2
XPASS: gcc.dg/tree-ssa/ssa-dom-cse-2.c scan-tree-dump optimized "return 28;"
FAIL: gcc.dg/tree-ssa/update-threading.c scan-tree-dump-times optimized 
"Invalid sum" 0
FAIL: gcc.dg/vect/vect-117.c -flto -ffat-lto-objects  scan-tree-dump-not 
optimized "Invalid sum"
FAIL: gcc.dg/vect/vect-117.c scan-tree-dump-not optimized "Invalid sum"
FAIL: gcc.target/powerpc/pr105334.c (test for excess errors)
FAIL: gcc.target/powerpc/rlwimi-2.c scan-assembler-times (?n)^s+[a-z] 20217
XPASS: gcc.target/powerpc/ppc-fortran/ieee128-math.f90   -O  (test for excess 
errors)

=== gcc Summary ===

# of expected passes179482
# of unexpected failures90
# of unexpected successes   20
# of expected failures  1619
# of unsupported tests  4251
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xgcc  version 15.0.0 20240503 
(experimental) [remotes/origin/HEAD r15-138-g8f3afb83c8] (GCC) 

=== gfortran tests ===


Running target unix
XPASS: gfortran.dg/default_format_2.f90   -O0  execution test
XPASS: gfortran.dg/default_format_2.f90   -O1  execution test
XPASS: gfortran.dg/default_format_2.f90   -O2  execution test
XPASS: gfortran.dg/default_format_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/default_format_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/default_format_2.f90   -Os  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O0  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O1  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O2  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -Os  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O0  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O1  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O2  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -Os  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O0  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O1  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O2  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O3 -g  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -Os  execution test

=== gfortran Summary ===

# of expected passes69847
# of unexpected failures6
# of unexpected successes   18
# of expected failures  273
# of unsupported tests  177
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/gfortran  version 15.0.0 
20240503 (experimental) [remotes/origin/HEAD r15-138-g8f3afb83c8] (GCC) 

=== g++ tests ===


Running target unix

=== g++ Summary ===

# of expected passes260366
# of expected failures  2620
# of unsupported tests  11688
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xg++  version 15.0.0 20240503 
(experimental) [remotes/origin/HEAD r15-138-g8f3afb83c8] (GCC) 

=== obj-c++ tests ===


Running target unix

=== obj-c++ Summary ===

# of expected passes1503
# of expected failures  10
# of unsupported tests  79
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xg++  version 15.0.0 20240503 
(experimental) [re

[gcc r14-10166] [PATCH] PR modula2/114929 for loop fails to iterate down to zero

2024-05-03 Thread Gaius Mulley via Gcc-cvs
https://gcc.gnu.org/g:d811080341adf9d805e3f79a8fd9be2e13bd9848

commit r14-10166-gd811080341adf9d805e3f79a8fd9be2e13bd9848
Author: Gaius Mulley 
Date:   Fri May 3 22:58:11 2024 +0100

[PATCH] PR modula2/114929 for loop fails to iterate down to zero

There is a bug in the for loop control code which is exposed when an
unsigned type is used in the iterator variable.  See
gm2/pim/run/pass/testforloopzero[234].mod.  The bug is in the
calculation of the last iterator value.  The bug fix is to avoid using
negative expressions when calculating the last iterator value with a
negative step value.  This patch detects if e1, e2, step value are all
constant, in which case the ztype is used internally and there is no
overflow.  If the last iterator value is held in a variable then it
uses a different method to calculate the last iterator depending upon
the sign of the step value.

gcc/m2/ChangeLog:

PR modula2/114929
* gm2-compiler/M2Quads.mod (ForLoopLastIteratorVariable): New
procedure.
(ForLoopLastIteratorConstant): Ditto.
(ForLoopLastIterator): Ditto.
(BuildForToByDo): Remove LastIterator calculation and call
ForLoopLastIterator instead.
(FinalValue): Replace with ...
(LastIterator): ... this.

gcc/testsuite/ChangeLog:

PR modula2/114929
* gm2/pim/run/pass/testforloopzero.mod: New test.
* gm2/pim/run/pass/testforloopzero2.mod: New test.
* gm2/pim/run/pass/testforloopzero3.mod: New test.
* gm2/pim/run/pass/testforloopzero4.mod: New test.

(cherry picked from commit a561dc0f6c7085e102fe9e9b6abd7f2138512576)

Signed-off-by: Gaius Mulley 

Diff:
---
 gcc/m2/gm2-compiler/M2Quads.mod| 191 +
 gcc/testsuite/gm2/pim/run/pass/testforloopzero.mod |  33 
 .../gm2/pim/run/pass/testforloopzero2.mod  |  35 
 .../gm2/pim/run/pass/testforloopzero3.mod  |  32 
 .../gm2/pim/run/pass/testforloopzero4.mod  |  32 
 5 files changed, 289 insertions(+), 34 deletions(-)

diff --git a/gcc/m2/gm2-compiler/M2Quads.mod b/gcc/m2/gm2-compiler/M2Quads.mod
index 8a9a23013b2..3f414e186b2 100644
--- a/gcc/m2/gm2-compiler/M2Quads.mod
+++ b/gcc/m2/gm2-compiler/M2Quads.mod
@@ -4583,6 +4583,144 @@ BEGIN
 END BuildForLoopToRangeCheck ;
 
 
+(*
+   ForLoopLastIteratorVariable - assigns the last value of the index variable 
to
+ symbol LastIterator.
+ The For Loop is regarded:
+
+ For ident := e1 To e2 By BySym Do
+
+ End
+*)
+
+PROCEDURE ForLoopLastIteratorVariable (LastIterator, e1, e2, BySym, ByType: 
CARDINAL ;
+   e1tok, e2tok, bytok: CARDINAL) ;
+VAR
+   PBType,
+   PositiveBy,
+   ElseQuad,
+   t, f  : CARDINAL ;
+BEGIN
+   Assert (IsVar (LastIterator)) ;
+   (* If By > 0 then.  *)
+   (* q+1 if >=  by0  q+3.  *)
+   (* q+2 GotoOp  q+else.   *)
+   PushTFtok (BySym, ByType, bytok) ;  (* BuildRelOp  1st parameter *)
+   PushT (GreaterEqualTok) ;   (* 2nd parameter *)
+   (* 3rd parameter *)
+   PushZero (bytok, ByType) ;
+   BuildRelOp (e2tok) ;   (* Choose final expression position.  *)
+   PopBool (t, f) ;
+   BackPatch (t, NextQuad) ;
+
+   (* LastIterator := ((e2-e1) DIV By) * By + e1.  *)
+   PushTF (LastIterator, GetSType (LastIterator)) ;
+   PushTFtok (e2, GetSType (e2), e2tok) ;
+   PushT (MinusTok) ;
+   PushTFtok (e1, GetSType (e1), e1tok) ;
+   doBuildBinaryOp (TRUE, FALSE) ;
+   PushT (DivideTok) ;
+   PushTFtok (BySym, ByType, bytok) ;
+   doBuildBinaryOp (FALSE, FALSE) ;
+   PushT (TimesTok) ;
+   PushTFtok (BySym, ByType, bytok) ;
+   doBuildBinaryOp (FALSE, FALSE) ;
+   PushT (ArithPlusTok) ;
+   PushTFtok (e1, GetSType (e1), e1tok) ;
+   doBuildBinaryOp (FALSE, FALSE) ;
+   BuildForLoopToRangeCheck ;
+   BuildAssignmentWithoutBounds (e1tok, FALSE, FALSE) ;
+   GenQuad (GotoOp, NulSym, NulSym, 0) ;
+   ElseQuad := NextQuad-1 ;
+
+   (* Else.  *)
+
+   BackPatch (f, NextQuad) ;
+
+   PushTtok (MinusTok, bytok) ;
+   PushTFtok (BySym, ByType, bytok) ;
+   BuildUnaryOp ;
+   PopTF (PositiveBy, PBType) ;  (* PositiveBy := - BySym.  *)
+
+   (* LastIterator := e1 - ((e1-e2) DIV PositiveBy) * PositiveBy.  *)
+   PushTF (LastIterator, GetSType (LastIterator)) ;
+   PushTFtok (e1, GetSType (e1), e1tok) ;
+   PushT (MinusTok) ;
+   PushTFtok (e1, GetSType (e1), e1tok) ;
+   PushT (MinusTok) ;
+   PushTFtok (e2, GetSType (e2), e2tok) ;
+   doBuildBinaryOp (TRUE, FALSE) ;
+   PushT (DivideTok) ;
+   PushTFtok (PositiveBy, ByType, bytok) ;
+   doBuildBinaryOp (FALSE, FALSE) ;
+   PushT (TimesTok) ;
+   PushTFtok (PositiveBy, ByType, bytok) ;
+   doBuildBinaryOp 

[Bug modula2/114929] for loop fails to iterate down to zero if a cardinal type (unsigned type) is used with a step of -1.

2024-05-03 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114929

--- Comment #6 from GCC Commits  ---
The releases/gcc-14 branch has been updated by Gaius Mulley
:

https://gcc.gnu.org/g:d811080341adf9d805e3f79a8fd9be2e13bd9848

commit r14-10166-gd811080341adf9d805e3f79a8fd9be2e13bd9848
Author: Gaius Mulley 
Date:   Fri May 3 22:58:11 2024 +0100

[PATCH] PR modula2/114929 for loop fails to iterate down to zero

There is a bug in the for loop control code which is exposed when an
unsigned type is used in the iterator variable.  See
gm2/pim/run/pass/testforloopzero[234].mod.  The bug is in the
calculation of the last iterator value.  The bug fix is to avoid using
negative expressions when calculating the last iterator value with a
negative step value.  This patch detects if e1, e2, step value are all
constant, in which case the ztype is used internally and there is no
overflow.  If the last iterator value is held in a variable then it
uses a different method to calculate the last iterator depending upon
the sign of the step value.

gcc/m2/ChangeLog:

PR modula2/114929
* gm2-compiler/M2Quads.mod (ForLoopLastIteratorVariable): New
procedure.
(ForLoopLastIteratorConstant): Ditto.
(ForLoopLastIterator): Ditto.
(BuildForToByDo): Remove LastIterator calculation and call
ForLoopLastIterator instead.
(FinalValue): Replace with ...
(LastIterator): ... this.

gcc/testsuite/ChangeLog:

PR modula2/114929
* gm2/pim/run/pass/testforloopzero.mod: New test.
* gm2/pim/run/pass/testforloopzero2.mod: New test.
* gm2/pim/run/pass/testforloopzero3.mod: New test.
* gm2/pim/run/pass/testforloopzero4.mod: New test.

(cherry picked from commit a561dc0f6c7085e102fe9e9b6abd7f2138512576)

Signed-off-by: Gaius Mulley 

[PATCH, obvious] Fix for ICE in tree-nested.cc

2024-05-03 Thread Sandra Loosemore
I'm planning to push the attached patch to mainline in a couple days, 
unless someone disputes that it's "obvious" or has some other objection. 
 I think it qualifies because the code immediately following the loop 
with the bad initializer is already conditionalized on GIMPLE_OMP_TARGET 
in the same way.


I think this patch is a candidate for backporting to the GCC 14 branch 
once it is unfrozen after the release, too.


-SandraFrom 001d166819525dcef43b980298c2f85af77cd8ad Mon Sep 17 00:00:00 2001
From: Sandra Loosemore 
Date: Mon, 22 Apr 2024 18:24:25 +
Subject: [PATCH, obvious] OpenMP: Fix for ICE in tree-nested.cc.

Use gimple_omp_target_clauses() instead of gimple_omp_taskreg_clauses()
when stmt is GIMPLE_OMP_TARGET, to avoid an as_a<> ICE.  The code
immediately following this is already conditionalized in the same way.

gcc/ChangeLog
	* tree-nested.cc (convert_tramp_reference_stmt): Use the correct
	accessor for GIMPLE_OMP_TARGET clauses.
---
 gcc/tree-nested.cc | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/gcc/tree-nested.cc b/gcc/tree-nested.cc
index 4e5f3be7676..fc0495d6443 100644
--- a/gcc/tree-nested.cc
+++ b/gcc/tree-nested.cc
@@ -2906,9 +2906,11 @@ convert_tramp_reference_stmt (gimple_stmt_iterator *gsi, bool *handled_ops_p,
 	  continue;
 	decl = i ? get_chain_decl (info) : info->frame_decl;
 	/* Don't add CHAIN.* or FRAME.* twice.  */
-	for (c = gimple_omp_taskreg_clauses (stmt);
-		 c;
-		 c = OMP_CLAUSE_CHAIN (c))
+	if (gimple_code (stmt) == GIMPLE_OMP_TARGET)
+	  c = gimple_omp_target_clauses (stmt);
+	else
+	  c = gimple_omp_taskreg_clauses (stmt);
+	for (; c; c = OMP_CLAUSE_CHAIN (c))
 	  if ((OMP_CLAUSE_CODE (c) == OMP_CLAUSE_FIRSTPRIVATE
 		   || OMP_CLAUSE_CODE (c) == OMP_CLAUSE_SHARED)
 		  && OMP_CLAUSE_DECL (c) == decl)
-- 
2.25.1



[Bug middle-end/114855] ICE: Segfault

2024-05-03 Thread amacleod at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114855

--- Comment #7 from Andrew Macleod  ---
LOoks like the primary culprits now are:

dominator optimization : 666.73 (  7%)   0.77 (  2%) 671.76 (  7%) 
 170M (  4%)
backwards jump threading   :7848.77 ( 85%)  21.04 ( 65%)7920.05 ( 85%) 
1332M ( 29%)

TOTAL  :9250.99 32.58   9341.40
4619M

Results for 20240503 releases/gcc-14 r14-10164-gdb447ec808e997 (GCC) testsuite on aarch64-unknown-linux-gnu

2024-05-03 Thread Gaius Mulley via Gcc-testresults


$ ../configure --prefix=/home/gaius/opt --libexecdir=/home/gaius/opt/lib 
--enable-host-shared --enable-threads=posix --enable-clocale=gnu 
--enable-checking --enable-long-longx --enable-languages=m2 --disable-multilib 
--enable-plugin --enable-bootstrap

gcc-branch: releases/gcc-14
git commit db447ec808e997bd13a849d9b3076792afb888cb

Linux 5.19.0-rc7-asahi-2-gbfe8f1b7e230 #1 SMP Sat Jul 23 17:21:00 CEST 2022 
aarch64 unknown GNU/Linux
GNU ld (GNU Binutils for Debian) 2.40
GNU assembler (GNU Binutils for Debian) 2.40
GNU Make 4.3
Test run by gaius on Fri May  3 21:51:00 2024
Native configuration is aarch64-unknown-linux-gnu

=== gm2 tests ===

Schedule of variations:
unix


=== gm2 Summary ===

# of expected passes13928


[Bug target/114860] [14/15 regression] [aarch64] 511.povray regresses by ~5.5% with -O3 -flto -march=native -mcpu=neoverse-v2 since r14-10014-ga2f4be3dae04fa

2024-05-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114860

--- Comment #5 from Andrew Pinski  ---
(In reply to prathamesh3492 from comment #4)
> To check for any
> possible icache misses I used L1I_CACHE_REFILL counter, and turns out that
> there are 64% more L1 icache misses for above adrp instruction with
> a2f4be3dae0 compared to 82d6d385f97, which may (partially) explain the
> performance difference ? Although perf stat shows there are around 7% more
> L1 icache misses for whole program run with 82d6d385f97 compared to
> a2f4be3dae0.

This makes it sound like there is some code alignment issue going on or a
branch misprediction issue going on. 

bad alignment: 4aeae4
good alignment 4aec44

The good alignment case is at the (almost) start at an icache line while the
bad alignment case is in the middle. (I am assuming 64byte cache lines which I
think is correct)

Maybe look at mispredicted branches too. It might be the branch leading to this
code is being mispredicted more due to the address of the branch is now
interfeeing with another branch.

It might just have been bad luck that caused this regression in both cases
really; alignment differences and/or address differences can be bad luck.

Results for 20240503 releases/gcc-14 r14-10164-gdb447ec808e997 (GCC) testsuite on x86_64-pc-linux-gnu

2024-05-03 Thread Gaius Mulley via Gcc-testresults


$ ../configure --prefix=/home/gaius/opt --libexecdir=/home/gaius/opt/lib 
--enable-host-shared --enable-threads=posix --enable-clocale=gnu 
--enable-checking --enable-long-longx --enable-languages=m2 --enable-multilib 
--disable-plugin --enable-bootstrap

gcc-branch: releases/gcc-14
git commit db447ec808e997bd13a849d9b3076792afb888cb

Linux 6.1.0-18-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 
unknown GNU/Linux
GNU ld (GNU Binutils for Debian) 2.40
GNU assembler (GNU Binutils for Debian) 2.40
GNU Make 4.3
Test run by gaius on Fri May  3 22:16:15 2024
Native configuration is x86_64-pc-linux-gnu

=== gm2 tests ===

Schedule of variations:
unix


=== gm2 Summary ===

# of expected passes13822


Re: [PATCH v2 6/6] bpf,btf: enable BTF pruning by default for BPF

2024-05-03 Thread Indu Bhagat

On 5/2/24 10:11, David Faust wrote:

This patch enables -fprune-btf by default in the BPF backend when
generating BTF information, and fixes BPF CO-RE generation when using
-fprune-btf.

When generating BPF CO-RE information, we must ensure that types used
in CO-RE relocations always have sufficient BTF information emited so
that the CO-RE relocations can be processed by a BPF loader.  The BTF
pruning algorithm on its own does not have sufficient information to
determine which types are used in a BPF CO-RE relocation, so this
information must be supplied by the BPF backend, using a new
btf_mark_type_used function.

Co-authored-by: Cupertino Miranda 

gcc/
* btfout.cc (btf_mark_type_used): New.
* ctfc.h (btf_mark_type_used): Declare it here.
* config/bpf/bpf.cc (bpf_option_override): Enable -fprune-btf
by default if -gbtf is enabled.
* config/bpf/bcore-builtins.cc (extra_fn): New typedef.
(compute_field_expr): Add callback parameter, and call it if supplied.
Fix computation for MEM_REF.
(mark_component_type_as_used): New.
(bpf_mark_types_as_used): Likewise.
(bpf_expand_core_builtin): Call here.
* doc/invoke.texi (Debugging Options): Note that -fprune-btf is
enabled by default for BPF target when generating BTF.

gcc/testsuite/
* gcc.dg/debug/btf/btf-variables-5.c: Add -fno-prune-btf to dg-options.
---
  gcc/btfout.cc | 22 ++
  gcc/config/bpf/bpf.cc |  5 ++
  gcc/config/bpf/core-builtins.cc   | 70 +--
  gcc/ctfc.h|  1 +
  gcc/doc/invoke.texi   |  3 +
  .../gcc.dg/debug/btf/btf-variables-5.c|  2 +-
  6 files changed, 96 insertions(+), 7 deletions(-)

diff --git a/gcc/btfout.cc b/gcc/btfout.cc
index 93d56492bbe..da2c9d35be9 100644
--- a/gcc/btfout.cc
+++ b/gcc/btfout.cc
@@ -1539,6 +1539,28 @@ btf_late_assign_datasec_ids (ctf_container_ref ctfc)
  }
  }
  
+

+/* Manually mark that type T is used to ensure it will not be pruned.
+   Used by the BPF backend when generating BPF CO-RE to mark types used
+   in CO-RE relocations.  */
+
+void
+btf_mark_type_used (tree t)
+{
+  /* If we are not going to prune anyway, this is a no-op.  */
+  if (!flag_prune_btf)
+return;
+
+  gcc_assert (TYPE_P (t));
+  ctf_container_ref ctfc = ctf_get_tu_ctfc ();
+  ctf_dtdef_ref dtd = ctf_lookup_tree_type (ctfc, t);
+
+  if (!dtd)
+return;
+
+  btf_minimal_add_type (ctfc, dtd, false, false);
+}
+
  /* Callback used for assembling the only-used-types list.  Note that this is
 the same as btf_type_list_cb above, but the hash_set traverse requires a
 different function signature.  */
diff --git a/gcc/config/bpf/bpf.cc b/gcc/config/bpf/bpf.cc
index e6ea211a2c6..75303ce8f46 100644
--- a/gcc/config/bpf/bpf.cc
+++ b/gcc/config/bpf/bpf.cc
@@ -221,6 +221,11 @@ bpf_option_override (void)
&& !(target_flags_explicit & MASK_BPF_CORE))
  target_flags |= MASK_BPF_CORE;
  
+  /* -gbtf implies -fprune-btf for BPF target.  */

+  if (btf_debuginfo_p ())
+SET_OPTION_IF_UNSET (_options, _options_set,
+flag_prune_btf, true);
+
/* Determine available features from ISA setting (-mcpu=).  */
if (bpf_has_jmpext == -1)
  bpf_has_jmpext = (bpf_isa >= ISA_V2);
diff --git a/gcc/config/bpf/core-builtins.cc b/gcc/config/bpf/core-builtins.cc
index d5a7de825ad..1b91b1c0d25 100644
--- a/gcc/config/bpf/core-builtins.cc
+++ b/gcc/config/bpf/core-builtins.cc
@@ -624,13 +624,20 @@ bpf_core_get_index (const tree node, bool *valid)
  
 ALLOW_ENTRY_CAST is an input arguments and specifies if the function should

 consider as valid expressions in which NODE entry is a cast expression (or
-   tree code nop_expr).  */
+   tree code nop_expr).
+
+   EXTRA_FN is a callback function to allow extra functionality with this
+   function traversal. Currently used for marking used type during expand
+   pass.  */
+
+typedef void (*extra_fn) (tree);
  
  static unsigned char

  compute_field_expr (tree node, unsigned int *accessors,
bool *valid,
tree *access_node,
-   bool allow_entry_cast = true)
+   bool allow_entry_cast = true,
+   extra_fn callback = NULL)
  {
unsigned char n = 0;
unsigned int fake_accessors[MAX_NR_ACCESSORS];
@@ -647,6 +654,9 @@ compute_field_expr (tree node, unsigned int *accessors,
  
*access_node = node;
  
+  if (callback != NULL)

+callback (node);
+
switch (TREE_CODE (node))
  {
  case INDIRECT_REF:
@@ -664,17 +674,19 @@ compute_field_expr (tree node, unsigned int *accessors,
  case COMPONENT_REF:
n = compute_field_expr (TREE_OPERAND (node, 0), accessors,
  valid,
- access_node, false);
+ access_node, false, 

Re: [PATCH v2 5/6] btf: add -fprune-btf option

2024-05-03 Thread Indu Bhagat

On 5/2/24 10:11, David Faust wrote:

This patch adds a new option, -fprune-btf, to control BTF debug info
generation.

As the name implies, this option enables a kind of "pruning" of the BTF
information before it is emitted.  When enabled, rather than emitting
all type information translated from DWARF, only information for types
directly used in the source program is emitted.

The primary purpose of this pruning is to reduce the amount of
unnecessary BTF information emitted, especially for BPF programs.  It is
very common for BPF programs to incldue Linux kernel internal headers in
order to have access to kernel data structures.  However, doing so often
has the side effect of also adding type definitions for a large number
of types which are not actually used by nor relevant to the program.
In these cases, -fprune-btf commonly reduces the size of the resulting
BTF information by approximately 10x.  This both slims down the size of
the resulting object and reduces the time required by the BPF loader to
verify the program and its BTF information.



The 10x reduction is substantial.  Do you think its is worthwhile to 
mention alongside that this data is the average observed for the kernel 
self-tests (I assume it is) ? Just useful info when parsing the commit 
logs, especially when some data is specified...



Note that the pruning implemented in this patch follows the same rules
as the BTF pruning performed unconditionally by LLVM's BPF backend when
generating BTF.  In particular, the main sources of pruning are:

   1) Only generate BTF for types used by variables and functions at
  the file scope.



I dont recollect anymore if BTF_KIND_VAR for unused static vars is also 
a correctness issue for BTF.  (With PR debug/113566, we know having 
BTF_KIND_DATASEC entries for optimized away vars is an issue).


It will be great to add some text here or elsewhere for posterity around 
this.



   2) Avoid emitting full BTF for struct and union types which are only
  pointed-to by members of other struct/union types.  In these cases,
  the full BTF_KIND_STRUCT or BTF_KIND_UNION which would normally
  be emitted is replaced with a BTF_KIND_FWD, as though the
  underlying type was a forward-declared struct or union type.

gcc/
* btfout.cc (btf_minimal_types): New hash set.
(struct btf_fixup): New.
(fixups, forwards): New vecs.
(btf_output): Calculate num_types depending on flag_prune_btf.
(btf_early_finsih): New initialization for flag_prune_btf.
(btf_mark_full_type_used): Likewise.
(btf_minimal_add_type): New function.
(btf_minimal_type_list_cb): Likewise.
(btf_late_collect_pruned_types): Likewise.
(btf_late_add_vars): Handle special case for variables in ".maps"
section when generating BTF for BPF CO-RE target.
(btf_late_finish): Use btf_late_collect_pruned_types when
flag_prune_btf in effect.  Move some initialization to btf_early_finish.
(btf_finalize): Additional deallocation for flag_prune_btf.
* common.opt (fprune-btf): New flag.
* ctfc.cc (init_ctf_strtable): Make non-static.
* ctfc.h (struct ctf_dtdef): Add visited_children_p boolean flag.
(init_ctf_strtable, ctfc_delete_strtab): Make extern.
* doc/invoke.texi (Debugging Options): Document -fprune-btf.

gcc/testsuite/
* gcc.dg/debug/btf/btf-prune-1.c: New test.
* gcc.dg/debug/btf/btf-prune-2.c: Likewise.
* gcc.dg/debug/btf/btf-prune-3.c: Likewise.
---
  gcc/btfout.cc| 394 ++-
  gcc/common.opt   |   4 +
  gcc/ctfc.cc  |   2 +-
  gcc/ctfc.h   |   5 +
  gcc/doc/invoke.texi  |  20 +
  gcc/testsuite/gcc.dg/debug/btf/btf-prune-1.c |  25 ++
  gcc/testsuite/gcc.dg/debug/btf/btf-prune-2.c |  33 ++
  gcc/testsuite/gcc.dg/debug/btf/btf-prune-3.c |  35 ++
  8 files changed, 511 insertions(+), 7 deletions(-)
  create mode 100644 gcc/testsuite/gcc.dg/debug/btf/btf-prune-1.c
  create mode 100644 gcc/testsuite/gcc.dg/debug/btf/btf-prune-2.c
  create mode 100644 gcc/testsuite/gcc.dg/debug/btf/btf-prune-3.c

diff --git a/gcc/btfout.cc b/gcc/btfout.cc
index 0af0bd39fc7..93d56492bbe 100644
--- a/gcc/btfout.cc
+++ b/gcc/btfout.cc
@@ -833,7 +833,10 @@ output_btf_types (ctf_container_ref ctfc)
  {
size_t i;
size_t num_types;
-  num_types = ctfc->ctfc_types->elements ();
+  if (flag_prune_btf)
+num_types = max_translated_id;
+  else
+num_types = ctfc->ctfc_types->elements ();
  
if (num_types)

  {
@@ -962,6 +965,211 @@ btf_early_add_func_records (ctf_container_ref ctfc)
  }
  }
  
+/* The set of types used directly in the source program, and any types manually

+   marked as used.  This is the set of types which will be emitted when
+   pruning (-fprune-btf) is enabled.  */


Nit: emitted when 

Results for 15.0.0 20240503 (experimental) [master revision gcc-15-138-g8f3afb83c87] (GCC) testsuite on arm-unknown-eabi

2024-05-03 Thread ci_notify--- via Gcc-testresults
_nzcvqg, lr
FAIL: gcc.target/arm/cmse/mainline/8m/softfp-sp/cmse-5.c  
-march=armv8-m.main+fp -mthumb  -O0   scan-assembler msr\\tAPSR_nzcvqg, lr
FAIL: gcc.target/arm/cmse/mainline/8m/softfp-sp/cmse-5.c  
-march=armv8-m.main+fp -mthumb  -O1   scan-assembler msr\\tAPSR_nzcvqg, lr
FAIL: gcc.target/arm/cmse/mainline/8m/softfp-sp/cmse-5.c  
-march=armv8-m.main+fp -mthumb  -O2   scan-assembler msr\\tAPSR_nzcvqg, lr
FAIL: gcc.target/arm/cmse/mainline/8m/softfp-sp/cmse-5.c  
-march=armv8-m.main+fp -mthumb  -O3 -g   scan-assembler msr\\tAPSR_nzcvqg, lr
FAIL: gcc.target/arm/cmse/mainline/8m/softfp-sp/cmse-5.c  
-march=armv8-m.main+fp -mthumb  -Os   scan-assembler msr\\tAPSR_nzcvqg, lr
FAIL: gcc.target/arm/cmse/mainline/8m/softfp/cmse-5.c  -march=armv8-m.main+fp 
-mthumb  -O0   scan-assembler msr\\tAPSR_nzcvqg, lr
FAIL: gcc.target/arm/cmse/mainline/8m/softfp/cmse-5.c  -march=armv8-m.main+fp 
-mthumb  -O1   scan-assembler msr\\tAPSR_nzcvqg, lr
FAIL: gcc.target/arm/cmse/mainline/8m/softfp/cmse-5.c  -march=armv8-m.main+fp 
-mthumb  -O2   scan-assembler msr\\tAPSR_nzcvqg, lr
FAIL: gcc.target/arm/cmse/mainline/8m/softfp/cmse-5.c  -march=armv8-m.main+fp 
-mthumb  -O3 -g   scan-assembler msr\\tAPSR_nzcvqg, lr
FAIL: gcc.target/arm/cmse/mainline/8m/softfp/cmse-5.c  -march=armv8-m.main+fp 
-mthumb  -Os   scan-assembler msr\\tAPSR_nzcvqg, lr
FAIL: gcc.target/arm/simd/mve-vshr.c scan-assembler-times 
vneg.s[0-9]+tq[0-9]+, q[0-9]+ 6
FAIL: gcc.target/arm/simd/mve-vshr.c scan-assembler-times 
vshl.s[0-9]+tq[0-9]+, q[0-9]+ 3
FAIL: gcc.target/arm/simd/mve-vshr.c scan-assembler-times 
vshl.u[0-9]+tq[0-9]+, q[0-9]+ 3

=== gcc Summary ===

# of expected passes166191
# of unexpected failures279
# of expected failures  1016
# of unresolved testcases   1
# of unsupported tests  9466
/home/tcwg-buildslave/workspace/tcwg_gnu_1/abe/builds/destdir/x86_64-pc-linux-gnu/bin/arm-eabi-gcc
  version 15.0.0 20240503 (experimental) [master revision 
gcc-15-138-g8f3afb83c87] (GCC) 

Host   is x86_64-pc-linux-gnu

=== g++ tests ===


Running target 
qemu/-mthumb/-march=armv8-m.main+dsp+fp/-mtune=cortex-m33/-mfloat-abi=hard/-mfpu=auto
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++14  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++14  expected 
multiline pattern lines 49-64
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++14 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++17  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++17  expected 
multiline pattern lines 49-64
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++17 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++20  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++20  expected 
multiline pattern lines 49-64
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++20 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++98  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++98  expected 
multiline pattern lines 49-64
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c  -std=c++98 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++14  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++14  expected 
multiline pattern lines 19-34
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++14 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++17  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++17  expected 
multiline pattern lines 19-34
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++17 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++20  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++20  expected 
multiline pattern lines 19-34
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++20 (test for 
excess errors)
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++98  2 blank 
line(s) in output
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++98  expected 
multiline pattern lines 19-34
FAIL: c-c++-common/analyzer/out-of-bounds-diagram-8.c  -std=c++98 (test for 
excess errors)
FAIL: g++.dg/cpp2a/decomp2.C  -std=gnu++14 (test for excess errors)
UNRESOLVED: g++.dg/cpp2a/decomp2.C  -std=gnu++14 compilation failed to produce 
executable
FAIL: g++.dg/cpp2a/decomp2.C  -std=gnu++17 (test for excess errors)
UNRESOLVED: g++.dg/cpp2a/decomp2.C  -std=gnu++17 compilation failed to produce 
executable
FAIL: g++.dg/cpp2a/decomp2.C  -std=gnu++20 (test for excess errors)
UNRESOLVED: g++.dg/cpp2a/decomp2.C  -std=gnu++20 

Re: [PATCH v2 4/6] btf: refactor and simplify implementation

2024-05-03 Thread Indu Bhagat

On 5/2/24 10:11, David Faust wrote:

This patch heavily refactors btfout.cc to take advantage of the
structural changes in the prior commits.

Now that inter-type references are internally stored as simply pointers,
all the painful, brittle, confusing infrastructure that was used in the
process of converting CTF type IDs to BTF type IDs can be thrown out.
This greatly simplifies the entire process of converting from CTF to
BTF, making the code cleaner, easier to read, and easier to maintain.

In addition, we no longer need to worry about destructive changes in
internal data structures used commonly by CTF and BTF, which allows
deleting several ancillary data structures previously used in btfout.cc.

This is nearly transparent, but a few improvements have also been made:

  1) BTF_KIND_FUNC records are now _always_ constructed at early_finish,
 allowing us to construct records even for functions which are later
 inlined by optimizations. DATASEC entries for functions are only
 constructed at late_finish, to avoid incorrectly generating entries
 for functions which get inlined.

  2) BTF_KIND_VAR records and DATASEC entries for them are now always
 constructed at (late) finish, which avoids cases where we could
 incorrectly create records for variables which were completely
 optimized away. This fixes PR debug/113566.



I am a bit unsure ATM, how this commit will look like once we revisit 
where the BTF is generated for BPF and non-BPF backends.  Since patch 
1/6 moved everything to (late)finish, but that will be problematic, I 
would like to defer reviewing this until the approach for 
afore-mentioned patch is pinned.



  3) Some additional assembler comments have been added with more
 information for debugging.

gcc/
* btfout.cc (struct btf_datasec_entry): New.
(struct btf_datasec): Add `id' member.  Change `entries' to use
new struct btf_datasec_entry.
(func_map): New hash_map.
(max_translated_id): New.
(btf_var_ids, btf_id_map, holes, voids, num_vars_added)
(num_types_added, num_types_created): Delete.
(btf_absolute_var_id, btf_relative_var_id, btf_absolute_func_id)
(btf_relative_func_id, btf_absolute_datasec_id, init_btf_id_map)
(get_btf_id, set_btf_id, btf_emit_id_p): Delete.
(btf_removed_type_p): Delete.
(btf_dtd_kind, btf_emit_type_p): New helpers.
(btf_fwd_to_enum_p, btf_calc_num_vbytes): Use them.
(btf_collect_datasec): Delete.
(btf_dtd_postprocess_cb, btf_dvd_emit_preprocess_cb)
(btf_dtd_emit_preprocess_cb, btf_emit_preprocess): Delete.
(btf_dmd_representable_bitfield_p): Adapt to type reference changes
and delete now-unused ctfc argument.
(btf_asm_datasec_type_ref): Delete.
(btf_asm_type_ref): Adapt to type reference changes, simplify.
(btf_asm_type): Likewise. Mark struct/union types with bitfield
members.
(btf_asm_array): Adapt to data structure changes.
(btf_asm_varent): Likewise.
(btf_asm_sou_member): Likewise. Ensure non-bitfield members are
correctly re-encoded if struct or union contains any bitfield.
(btf_asm_func_arg, btf_asm_func_type, btf_asm_datasec_entry)
(btf_asm_datasec_type): Adapt to data structure changes.
(output_btf_header): Adapt to other changes, simplify type
length calculation, add info to assembler comments.
(output_btf_vars): Adapt to other changes.
(output_btf_strs): Fix overlong lines.
(output_asm_btf_sou_fields, output_asm_btf_enum_list)
(output_asm_btf_func_args_list, output_asm_btf_vlen_bytes)
(output_asm_btf_type, output_btf_types, output_btf_func_types)
(output_btf_datasec_types): Adapt to other changes.
(btf_init_postprocess): Delete.
(btf_output): Change to only perform output.
(btf_early_add_const_void, btf_early_add_func_records): New.
(btf_early_finish): Use them here. New.
(btf_datasec_push_entry): Adapt to data structure changes.
(btf_datasec_add_func, btf_datasec_add_var): New.
(btf_late_add_func_datasec_entries): New.
(btf_emit_variable_p): New helper.
(btf_late_add_vars): Use it here. New.
(btf_type_list_cb, btf_late_collect_translated_types): New.
(btf_late_assign_func_ids, btf_late_assign_var_ids)
(btf_late_assign_datasec_ids): New.
(btf_finish): Remove unused argument. Call new btf_late*
functions and btf_output.
(btf_finalize): Adapt to data structure changes.
* ctfc.h (struct ctf_dtdef): Convert existing boolean flags to
BOOL_BITFIELD and reorder.
(struct ctf_dvdef): Add dvd_id member.
(btf_finish): Remove argument from prototype.
(get_btf_id): Delete prototype.
(funcs_traverse_callback, traverse_btf_func_types): Add an
explanatory comment.
* 

Re: [PATCH v2 3/6] ctf: use pointers instead of IDs internally

2024-05-03 Thread Indu Bhagat

On 5/2/24 10:11, David Faust wrote:

This patch replaces all inter-type references in the ctfc internal data
structures with pointers, rather than the references-by-ID which were
used previously.

A couple of small updates in the BPF backend are included to make it
compatible with the change.

This change is only to the in-memory representation of various CTF
structures to make them easier to work with in various cases.  It is
outwardly transparent; there is no change in emitted CTF.

gcc/
* btfout.cc (btf_dvd_emit_preprocess_cb, btf_emit_preprocess)
(btf_dmd_representable_bitfield_p, btf_asm_array, btf_asm_varent)
(btf_asm_sou_member, btf_asm_func_arg, btf_init_postprocess):
Adapt to structural changes in ctf_* structs.
* ctfc.h (struct ctf_dtdef): Add forward declaration.
(struct ctf_arinfo, struct ctf_funcinfo, struct ctf_sliceinfo)
(struct ctf_itype, struct ctf_dmdef, struct ctf_func_arg)
(struct ctf_dvdef): Use pointers instead of type IDs for
references to other types.
(struct ctf_dtdef): Add ref_type member.
(ctf_type_exists): Use pointer instead of type ID.
(ctf_add_reftype, ctf_add_enum, ctf_add_slice, ctf_add_float)
(ctf_add_integer, ctf_add_unknown, ctf_add_pointer)
(ctf_add_array, ctf_add_forward, ctf_add_typedef)
(ctf_add_function, ctf_add_sou, ctf_add_enumerator)
(ctf_add_variable): Likewise. Return pointer instead of ID.
(ctf_lookup_tree_type): Return pointer to type instead of ID.
* ctfc.cc: Analogous changes.
* ctfout.cc (ctf_asm_type, ctf_asm_slice, ctf_asm_varent)
(ctf_asm_sou_lmember, ctf_asm_sou_member, ctf_asm_func_arg)
(output_ctf_objt_info): Adapt to changes.
* dwarf2ctf.cc (gen_ctf_type, gen_ctf_void_type)
(gen_ctf_unknown_type, gen_ctf_base_type, gen_ctf_pointer_type)
(gen_ctf_subrange_type, gen_ctf_array_type, gen_ctf_typedef)
(gen_ctf_modifier_type, gen_ctf_sou_type, gen_ctf_function_type)
(gen_ctf_enumeration_type, gen_ctf_variable, gen_ctf_function)
(gen_ctf_type, ctf_do_die): Likewise.
* config/bpf/btfext-out.cc (struct btf_ext_core_reloc): Use
pointer instead of type ID.
(bpf_core_reloc_add, bpf_core_get_sou_member_index)
(output_btfext_core_sections): Adapt to above changes.
* config/bpf/core-builtins.cc (process_type): Likewise.
---
  gcc/btfout.cc   |  35 ++---
  gcc/config/bpf/btfext-out.cc|  12 +-
  gcc/config/bpf/core-builtins.cc |   3 +-
  gcc/ctfc.cc | 137 +-
  gcc/ctfc.h  |  61 
  gcc/ctfout.cc   |  19 +--
  gcc/dwarf2ctf.cc| 244 +++-
  7 files changed, 252 insertions(+), 259 deletions(-)

diff --git a/gcc/config/bpf/btfext-out.cc b/gcc/config/bpf/btfext-out.cc
index 7ec438fd1d1..ce596e33643 100644
--- a/gcc/config/bpf/btfext-out.cc
+++ b/gcc/config/bpf/btfext-out.cc
@@ -134,7 +134,7 @@ struct GTY ((chain_next ("%h.next"))) btf_ext_lineinfo
  
  /* Internal representation of a BPF CO-RE relocation record.  */

  struct GTY ((chain_next ("%h.next"))) btf_ext_core_reloc {
-  unsigned int bpfcr_type; /* BTF type ID of container.  */
+  ctf_dtdef_ref bpfcr_type;/* BTF type of container.  */


I find the comment "BTF type of container" associated with the member 
confusing.  May be we say " BTF type involved with the reloc " or 
something like that ?



unsigned int  bpfcr_astr_off;   /* Offset of access string in 
.BTF
   string table.  */
rtx_code_label * bpfcr_insn_label;  /* RTX label attached to instruction
@@ -296,13 +296,14 @@ bpf_core_reloc_add (const tree type, const char * 
section_name,
struct btf_ext_core_reloc *bpfcr = bpf_create_core_reloc (section_name, 
);
  
ctf_container_ref ctfc = ctf_get_tu_ctfc ();

+  ctf_dtdef_ref dtd = ctf_lookup_tree_type (ctfc, type);
  
/* Buffer the access string in the auxiliary strtab.  */

bpfcr->bpfcr_astr_off = 0;
gcc_assert (accessor != NULL);
bpfcr->bpfcr_astr_off = btf_ext_add_string (accessor);
  
-  bpfcr->bpfcr_type = get_btf_id (ctf_lookup_tree_type (ctfc, type));

+  bpfcr->bpfcr_type = dtd;
bpfcr->bpfcr_insn_label = label;
bpfcr->bpfcr_kind = kind;
  
@@ -341,7 +342,7 @@ bpf_core_get_sou_member_index (ctf_container_ref ctfc, const tree node)

for (dmd = dtd->dtd_u.dtu_members;
 dmd != NULL; dmd = (ctf_dmdef_t *) ctf_dmd_list_next (dmd))
  {
- bool field_has_btf = get_btf_id (dmd->dmd_type) <= BTF_MAX_TYPE;
+ bool field_has_btf = (dmd->dmd_type && dmd->dmd_type->dtd_type <= 
BTF_MAX_TYPE);
  
  	  if (field == node)

return field_has_btf ? i : -1;
@@ -574,8 +575,9 @@ output_btfext_core_sections (void)
 false);
  

Results for 15.0.0 20240503 (experimental) [master r15-136-gcb5d904c77] (GCC) testsuite on powerpc64-unknown-linux-gnu

2024-05-03 Thread Bill Seurer (POWER9 BE) via Gcc-testresults


git commit g:cb5d904c775ed7172f8dd7565ec7f5395503d06f
gcc-descr r15-136-gcb5d904c775ed7

power9 BE
Linux 6.7.12-powerpc64 ppc64
GNU Make 4.3

DejaGnu:
DejaGnu version 1.6.3
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Fri May  3 19:31:20 UTC 2024 (revision r15-136-gcb5d904c77)

Native configuration is powerpc64-unknown-linux-gnu

=== g++ tests ===


Running target unix/-m32
FAIL: c-c++-common/torture/strub-run3.c   -O0  execution test

=== g++ Summary for unix/-m32 ===

# of expected passes251300
# of unexpected failures1
# of expected failures  2615
# of unsupported tests  11522

Running target unix/-m64

=== g++ Summary for unix/-m64 ===

# of expected passes260314
# of expected failures  2620
# of unsupported tests  11695

=== g++ Summary ===

# of expected passes511614
# of unexpected failures1
# of expected failures  5235
# of unsupported tests  23217
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xg++  version 15.0.0 20240503 
(experimental) [master r15-136-gcb5d904c77] (GCC) 

=== gcc tests ===


Running target unix/-m32
XPASS: gcc.dg/guality/example.c   -O0  execution test
XPASS: gcc.dg/guality/example.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/example.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O0  execution test
XPASS: gcc.dg/guality/guality.c   -O1  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/guality.c   -O3 -g  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c   -Os  -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/guality.c  -Og -DPREVENT_OPTIMIZATION  execution test
XPASS: gcc.dg/guality/inline-params.c   -O2  -DPREVENT_OPTIMIZATION  execution 
test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION execution test
XPASS: gcc.dg/guality/inline-params.c   -O3 -g  -DPREVENT_OPTIMIZATION  
execution test
XPASS: gcc.dg/guality/inline-params.c   -Os  -DPREVENT_OPTIMIZATION  execution 
test
FAIL: gcc.dg/guality/loop-1.c   -O2  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/loop-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 i == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg1 == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg2 == 2
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg3 == 3
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg4 == 4
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg5 == 5
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg6 == 6
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 arg7 == 30
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg1 == 1
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg2 == 2
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg3 == 3
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg4 == 4
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg5 == 5
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg6 == 6
FAIL: gcc.dg/guality/pr36728-2.c   -O2 -flto -fuse-linker

Re: [PATCH v2 1/6] ctf, btf: restructure CTF/BTF emission

2024-05-03 Thread Indu Bhagat

On 5/2/24 10:11, David Faust wrote:

This commit makes some structural changes to the CTF/BTF debug info
emission.  In particular:

  a) CTF is new always fully generated and emitted before any
 BTF-related procedures are run.  This means that BTF-related
 functions can change, even irreversibly, the shared in-memory
 representation used by the two formats without issue.

  b) BTF generation has fewer entry points, and is cleanly divided
 into early_finish and finish.

  c) BTF is now always emitted at finish (called from dwarf2out_finish),
 rather than being emitted at early_finish for targets other than
 BPF CO-RE.  Note that this change alone does not alter the contents
 of BTF at all, regardless of whether it would have previously been
 emitted at early_finish or finish.



This will necessitate that we disallow -gbtf with -flto for non-BPF 
targets.  Emitting BTF always at dwarf2out_finish will not work with LTO.



The changes are transparent to both CTF and BTF emission.

gcc/
* btfout.cc (btf_init_postprocess): Rename to...
(btf_early_finish): ...this.
(btf_output): Rename to...
(btf_finish): ...this.
* ctfc.h: Analogous changes.
* dwarf2ctf.cc (ctf_debug_early_finish): Conditionally call
btf_early_finish or ctf_finalize as appropriate.
(ctf_debug_finish): Always call btf_finish here if generating
BTF info.
(ctf_debug_finalize, ctf_debug_init_postprocess): Delete.
* dwarf2out.cc (dwarf2out_early_finish): Remove call to
ctf_debug_init_postprocess.
---
  gcc/btfout.cc| 28 +
  gcc/ctfc.h   |  4 ++--
  gcc/dwarf2ctf.cc | 54 +++-
  gcc/dwarf2out.cc |  2 --
  4 files changed, 42 insertions(+), 46 deletions(-)

diff --git a/gcc/btfout.cc b/gcc/btfout.cc
index 07f066a4706..1b6a9ed811f 100644
--- a/gcc/btfout.cc
+++ b/gcc/btfout.cc
@@ -1491,6 +1491,34 @@ btf_finalize (void)
tu_ctfc = NULL;
  }
  
+/* Initial entry point of BTF generation, called at early_finish () after

+   CTF information has possibly been output.  Translate all CTF information
+   to BTF, and do any processing that must be done early, such as creating
+   BTF_KIND_FUNC records.  */
+
+void
+btf_early_finish (void)
+{
+  btf_init_postprocess ();
+}
+
+/* Late entry point for BTF generation, called from dwarf2out_finish ().
+   Complete and emit BTF information.  */
+
+void
+btf_finish (const char * filename)
+{
+  btf_output (filename);
+
+  /* If compiling for BPF with CO-RE info, we cannot deallocate until after
+ CO-RE information is created, which happens very late in BPF backend.
+ Therefore, the deallocation (i.e. btf_finalize ()) is delayed until
+ TARGET_ASM_FILE_END for BPF CO-RE.  */
+  if (!btf_with_core_debuginfo_p ())
+btf_finalize ();
+}
+
+
  /* Traversal function for all BTF_KIND_FUNC type records.  */
  
  bool

diff --git a/gcc/ctfc.h b/gcc/ctfc.h
index fa188bf2f5a..e7bd93901cf 100644
--- a/gcc/ctfc.h
+++ b/gcc/ctfc.h
@@ -384,8 +384,8 @@ extern void ctf_init (void);
  extern void ctf_output (const char * filename);
  extern void ctf_finalize (void);
  
-extern void btf_output (const char * filename);

-extern void btf_init_postprocess (void);
+extern void btf_early_finish (void);
+extern void btf_finish (const char * filename);
  extern void btf_finalize (void);
  
  extern ctf_container_ref ctf_get_tu_ctfc (void);

diff --git a/gcc/dwarf2ctf.cc b/gcc/dwarf2ctf.cc
index dc59569fe56..ec94982e4b1 100644
--- a/gcc/dwarf2ctf.cc
+++ b/gcc/dwarf2ctf.cc
@@ -933,30 +933,6 @@ gen_ctf_type (ctf_container_ref ctfc, dw_die_ref die)
return type_id;
  }
  
-/* Prepare for output and write out the CTF debug information.  */

-
-static void
-ctf_debug_finalize (const char *filename, bool btf)
-{
-  if (btf)
-{
-  btf_output (filename);
-  /* btf_finalize when compiling BPF applciations gets deallocated by the
-BPF target in bpf_file_end.  */
-  if (btf_debuginfo_p () && !btf_with_core_debuginfo_p ())
-   btf_finalize ();
-}
-
-  else
-{
-  /* Emit the collected CTF information.  */
-  ctf_output (filename);
-
-  /* Reset the CTF state.  */
-  ctf_finalize ();
-}
-}
-
  bool
  ctf_do_die (dw_die_ref die)
  {
@@ -996,27 +972,21 @@ ctf_debug_init (void)
add_name_attribute (ctf_unknown_die, "unknown");
  }
  
-/* Preprocess the CTF debug information after initialization.  */

-
-void
-ctf_debug_init_postprocess (bool btf)
-{
-  /* Only BTF requires postprocessing right after init.  */
-  if (btf)
-btf_init_postprocess ();
-}
-
  /* Early finish CTF/BTF debug info.  */
  
  void

  ctf_debug_early_finish (const char * filename)
  {
-  /* Emit CTF debug info early always.  */
-  if (ctf_debug_info_level > CTFINFO_LEVEL_NONE
-  /* Emit BTF debug info early if CO-RE relocations are not
-required.  */
-  || (btf_debuginfo_p () && 

Second GCC 14.1 Release Candidate available from gcc.gnu.org

2024-05-03 Thread Jakub Jelinek via Gcc
The second release candidate for GCC 14.1 is available from

 https://gcc.gnu.org/pub/gcc/snapshots/14.1.0-RC-20240503/
 ftp://gcc.gnu.org/pub/gcc/snapshots/14.1.0-RC-20240503/

and shortly its mirrors.  It has been generated from git commit
r14-10165-g3b4d6b6ecd79df790.

The https://gcc.gnu.org/PR114935 bug has been reported and determined
a release blocker, so we'd like to get extra testing on it prior to
the release.

I have so far bootstrapped and tested the release candidate on
x86_64-linux.  Please test it and report any issues to bugzilla.

If all goes well, we'd still like to release 14.1 on Tuesday, May 7th.



[PATCH v21 20/23] c++: Implement __is_invocable built-in trait

2024-05-03 Thread Ken Matsui
Fixed datum reference problem.  Ok for trunk?

-- >8 --

This patch implements built-in trait for std::is_invocable.

gcc/cp/ChangeLog:

* cp-trait.def: Define __is_invocable.
* constraint.cc (diagnose_trait_expr): Handle CPTK_IS_INVOCABLE.
* semantics.cc (trait_expr_value): Likewise.
(finish_trait_expr): Likewise.
* cp-tree.h (build_invoke): New function.
* method.cc (build_invoke): New function.

gcc/testsuite/ChangeLog:

* g++.dg/ext/has-builtin-1.C: Test existence of __is_invocable.
* g++.dg/ext/is_invocable1.C: New test.
* g++.dg/ext/is_invocable2.C: New test.
* g++.dg/ext/is_invocable3.C: New test.
* g++.dg/ext/is_invocable4.C: New test.

Signed-off-by: Ken Matsui 
---
 gcc/cp/constraint.cc |   6 +
 gcc/cp/cp-trait.def  |   1 +
 gcc/cp/cp-tree.h |   2 +
 gcc/cp/method.cc | 137 +
 gcc/cp/semantics.cc  |   5 +
 gcc/testsuite/g++.dg/ext/has-builtin-1.C |   3 +
 gcc/testsuite/g++.dg/ext/is_invocable1.C | 349 +++
 gcc/testsuite/g++.dg/ext/is_invocable2.C | 139 +
 gcc/testsuite/g++.dg/ext/is_invocable3.C |  51 
 gcc/testsuite/g++.dg/ext/is_invocable4.C |  33 +++
 10 files changed, 726 insertions(+)
 create mode 100644 gcc/testsuite/g++.dg/ext/is_invocable1.C
 create mode 100644 gcc/testsuite/g++.dg/ext/is_invocable2.C
 create mode 100644 gcc/testsuite/g++.dg/ext/is_invocable3.C
 create mode 100644 gcc/testsuite/g++.dg/ext/is_invocable4.C

diff --git a/gcc/cp/constraint.cc b/gcc/cp/constraint.cc
index c28d7bf428e..6d14ef7dcc7 100644
--- a/gcc/cp/constraint.cc
+++ b/gcc/cp/constraint.cc
@@ -3792,6 +3792,12 @@ diagnose_trait_expr (tree expr, tree args)
 case CPTK_IS_FUNCTION:
   inform (loc, "  %qT is not a function", t1);
   break;
+case CPTK_IS_INVOCABLE:
+  if (!t2)
+inform (loc, "  %qT is not invocable", t1);
+  else
+inform (loc, "  %qT is not invocable by %qE", t1, t2);
+  break;
 case CPTK_IS_LAYOUT_COMPATIBLE:
   inform (loc, "  %qT is not layout compatible with %qT", t1, t2);
   break;
diff --git a/gcc/cp/cp-trait.def b/gcc/cp/cp-trait.def
index b1c875a6e7d..4e420d5390a 100644
--- a/gcc/cp/cp-trait.def
+++ b/gcc/cp/cp-trait.def
@@ -75,6 +75,7 @@ DEFTRAIT_EXPR (IS_EMPTY, "__is_empty", 1)
 DEFTRAIT_EXPR (IS_ENUM, "__is_enum", 1)
 DEFTRAIT_EXPR (IS_FINAL, "__is_final", 1)
 DEFTRAIT_EXPR (IS_FUNCTION, "__is_function", 1)
+DEFTRAIT_EXPR (IS_INVOCABLE, "__is_invocable", -1)
 DEFTRAIT_EXPR (IS_LAYOUT_COMPATIBLE, "__is_layout_compatible", 2)
 DEFTRAIT_EXPR (IS_LITERAL_TYPE, "__is_literal_type", 1)
 DEFTRAIT_EXPR (IS_MEMBER_FUNCTION_POINTER, "__is_member_function_pointer", 1)
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 52d6841559c..8aa41f7147f 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -7340,6 +7340,8 @@ extern tree get_copy_assign   (tree);
 extern tree get_default_ctor   (tree);
 extern tree get_dtor   (tree, tsubst_flags_t);
 extern tree build_stub_object  (tree);
+extern tree build_invoke   (tree, const_tree,
+tsubst_flags_t);
 extern tree strip_inheriting_ctors (tree);
 extern tree inherited_ctor_binfo   (tree);
 extern bool base_ctor_omit_inherited_parms (tree);
diff --git a/gcc/cp/method.cc b/gcc/cp/method.cc
index 08a3d34fb01..80791227a0a 100644
--- a/gcc/cp/method.cc
+++ b/gcc/cp/method.cc
@@ -1928,6 +1928,143 @@ build_trait_object (tree type)
   return build_stub_object (type);
 }
 
+/* [func.require] Build an expression of INVOKE(FN_TYPE, ARG_TYPES...).  If the
+   given is not invocable, returns error_mark_node.  */
+
+tree
+build_invoke (tree fn_type, const_tree arg_types, tsubst_flags_t complain)
+{
+  if (error_operand_p (fn_type) || error_operand_p (arg_types))
+return error_mark_node;
+
+  gcc_assert (TYPE_P (fn_type));
+  gcc_assert (TREE_CODE (arg_types) == TREE_VEC);
+
+  /* Access check is required to determine if the given is invocable.  */
+  deferring_access_check_sentinel acs (dk_no_deferred);
+
+  /* INVOKE is an unevaluated context.  */
+  cp_unevaluated cp_uneval_guard;
+
+  bool is_ptrdatamem;
+  bool is_ptrmemfunc;
+  if (TREE_CODE (fn_type) == REFERENCE_TYPE)
+{
+  tree deref_fn_type = TREE_TYPE (fn_type);
+  is_ptrdatamem = TYPE_PTRDATAMEM_P (deref_fn_type);
+  is_ptrmemfunc = TYPE_PTRMEMFUNC_P (deref_fn_type);
+
+  /* Dereference fn_type if it is a pointer to member.  */
+  if (is_ptrdatamem || is_ptrmemfunc)
+   fn_type = deref_fn_type;
+}
+  else
+{
+  is_ptrdatamem = TYPE_PTRDATAMEM_P (fn_type);
+  is_ptrmemfunc = TYPE_PTRMEMFUNC_P (fn_type);
+}
+
+  if (is_ptrdatamem && TREE_VEC_LENGTH (arg_types) != 1)
+{
+  if (complain & tf_error)
+   

[Bug c/114938] Function argument column info seems to have been lost

2024-05-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114938

Andrew Pinski  changed:

   What|Removed |Added

  Component|middle-end  |c
Summary|Basic blocks in generated   |Function argument column
   |CFG referencing the |info seems to have been
   |incorrect source token  |lost
   |column  |

--- Comment #2 from Andrew Pinski  ---
Take the reduced testcase we get using the C front-end:
```
int proc_dostring (struct ctl_table * table, int write, void * buffer, int *
lenp, int * ppos)
[/app/example.cpp:13:1] {
  int D.2793;

  [/app/example.cpp:14:5] if (write != 0) goto ; else goto ;
  :
  [/app/example.cpp:15:3] proc_first_pos_non_zero_ignore (ppos, table);
  :
  [/app/example.cpp:17:9] _1 = [/app/example.cpp:17:9] table->maxlen;
  [/app/example.cpp:17:9] _2 = [/app/example.cpp:17:9] table->data;
  [/app/example.cpp:17:9] D.2793 = _proc_do_string (_2, _1, write, buffer,
lenp, ppos);
  [/app/example.cpp:17:9] return D.2793;
}

```

The column 9 is the start of the call. But really the first statement should
have a column of 24.

Note with the C++ FE we get:

  [/app/example.cpp:17:24] _1 = [/app/example.cpp:17:24] table->maxlen;
  [/app/example.cpp:17:24] _2 = [/app/example.cpp:17:24] table->data;
  [/app/example.cpp:17:24] D.2822 = _proc_do_string (_2, _1, write, buffer,
lenp, ppos);
  [/app/example.cpp:17:24 discrim 1] D.2820 = D.2822;

the :24 is the column after `(`.

But _2 statement really should be the column after the first `,`.

I remember seeing this before ...

[Bug c++/114933] [15 Regression] mcfgthread-1.6.1 typecheck failure: error: explicit specializations are not permitted here

2024-05-03 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114933

--- Comment #9 from Sergei Trofimovich  ---
The mcfgthread change fixed the full gcc build for me. Thank you!

[Bug middle-end/111111] omnetpp: ICEs with dump flags, PGO and LTO

2024-05-03 Thread cmuellner at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=11

Christoph Müllner  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #2 from Christoph Müllner  ---
This can't be reproduced anymore (retested with master and releases/gcc-14).

[Bug middle-end/114938] Basic blocks in generated CFG referencing the incorrect source token column

2024-05-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114938

--- Comment #1 from Andrew Pinski  ---
Created attachment 58102
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58102=edit
reduced

[Bug testsuite/114939] [15 regression] c-c++-common/torture/strub-run3.c fails after r15-125-g7117e1f6bf6de2

2024-05-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114939

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Keywords||testsuite-fail
  Component|other   |testsuite
 Ever confirmed|0   |1
   Target Milestone|--- |15.0
   Last reconfirmed||2024-05-03

--- Comment #2 from Andrew Pinski  ---
So confirmed and a testsuite issue ...

Re: [PATCH] c++: 'typename T::X' vs 'struct T::X' lookup [PR109420]

2024-05-03 Thread Andrew Pinski
On Fri, May 3, 2024 at 8:08 AM Patrick Palka  wrote:
>
> Hey Andrew,
>
> On Wed, 5 Apr 2023, Andrew Pinski wrote:
>
> > On Wed, Apr 5, 2023 at 10:32 AM Patrick Palka via Gcc-patches
> >  wrote:
> > >
> > > On Wed, 5 Apr 2023, Patrick Palka wrote:
> > >
> > > > r13-6098-g46711ff8e60d64 made make_typename_type no longer ignore
> > > > non-types during the lookup, unless the TYPENAME_TYPE in question was
> > > > followed by the :: scope resolution operator.  But there is another
> > > > exception to this rule: we need to ignore non-types during the lookup
> > > > also if the TYPENAME_TYPE was named with a tag other than 'typename',
> > > > such as 'struct' or 'enum', as per [dcl.type.elab]/5.
> > > >
> > > > This patch implements this additional exception.  It occurred to me that
> > > > the tf_qualifying_scope flag is probably unnecessary if we'd use the
> > > > scope_type tag more thoroughly, but that requires parser changes that
> > > > are probably too risky at this stage.  (I'm working on addressing the
> > > > FIXME/TODOs here for GCC 14.)
> > > >
> > > > Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for
> > > > trunk?
> > > >
> > > >   PR c++/109420
> > > >
> > > > gcc/cp/ChangeLog:
> > > >
> > > >   * decl.cc (make_typename_type): Also ignore non-types during
> > > >   the lookup if tag_type is something other than none_type or
> > > >   typename_type.
> > > >   * pt.cc (tsubst) : Pass class_type or
> > > >   enum_type as tag_type to make_typename_type as appropriate
> > > >   instead of always passing typename_type.
> > > >
> > > > gcc/testsuite/ChangeLog:
> > > >
> > > >   * g++.dg/template/typename27.C: New test.
> > > > ---
> > > >  gcc/cp/decl.cc |  9 -
> > > >  gcc/cp/pt.cc   |  9 -
> > > >  gcc/testsuite/g++.dg/template/typename27.C | 19 +++
> > > >  3 files changed, 35 insertions(+), 2 deletions(-)
> > > >  create mode 100644 gcc/testsuite/g++.dg/template/typename27.C
> > > >
> > > > diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc
> > > > index 5369714f9b3..a0a20c5accc 100644
> > > > --- a/gcc/cp/decl.cc
> > > > +++ b/gcc/cp/decl.cc
> > > > @@ -4307,7 +4307,14 @@ make_typename_type (tree context, tree name, 
> > > > enum tag_types tag_type,
> > > >   lookup will stop when we hit a dependent base.  */
> > > >if (!dependent_scope_p (context))
> > > >  {
> > > > -  bool want_type = (complain & tf_qualifying_scope);
> > > > +  /* As per [dcl.type.elab]/5 and [temp.res.general]/3, ignore 
> > > > non-types if
> > > > +  the tag corresponds to a class-key or 'enum' (or is scope_type), 
> > > > or if
> > > > +  this typename is followed by :: as per 
> > > > [basic.lookup.qual.general]/1.
> > > > +  TODO: If we'd set the scope_type tag accurately on all 
> > > > TYPENAME_TYPEs
> > > > +  that are followed by :: then we wouldn't need the 
> > > > tf_qualifying_scope
> > > > +  flag.  */
> > > > +  bool want_type = (tag_type != none_type && tag_type != 
> > > > typename_type)
> > > > + || (complain & tf_qualifying_scope);
> > >
> > > Here's v2 which just slightly improves this comment.  I reckon 
> > > [basic.lookup.elab]
> > > is a better reference than [dcl.type.elab]/5 for justifying why the
> > > lookup should be type-only for class-key and 'enum' TYPENAME_TYPEs.
> > >
> > > -- >8 --
> > >
> > > PR c++/109420
> > >
> > > gcc/cp/ChangeLog:
> > >
> > > * decl.cc (make_typename_type): Also ignore non-types during the
> > > lookup if tag_type corresponds to an elaborated-type-specifier.
> > > * pt.cc (tsubst) : Pass class_type or
> > > enum_type as tag_type to make_typename_type as appropriate
> > > instead of always passing typename_type.
> > >
> > > gcc/testsuite/ChangeLog:
> > >
> > > * g++.dg/template/typename27.C: New test.
> > > ---
> > >  gcc/cp/decl.cc | 12 +++-
> > >  gcc/cp/pt.cc   |  9 -
> > >  gcc/testsuite/g++.dg/template/typename27.C | 19 +++
> > >  3 files changed, 38 insertions(+), 2 deletions(-)
> > >  create mode 100644 gcc/testsuite/g++.dg/template/typename27.C
> > >
> > > diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc
> > > index 5369714f9b3..772c059dc2c 100644
> > > --- a/gcc/cp/decl.cc
> > > +++ b/gcc/cp/decl.cc
> > > @@ -4307,7 +4307,17 @@ make_typename_type (tree context, tree name, enum 
> > > tag_types tag_type,
> > >   lookup will stop when we hit a dependent base.  */
> > >if (!dependent_scope_p (context))
> > >  {
> > > -  bool want_type = (complain & tf_qualifying_scope);
> > > +  /* We generally don't ignore non-types during TYPENAME_TYPE lookup
> > > +(as per [temp.res.general]/3), unless
> > > +  - the tag corresponds to a class-key or 'enum' so
> > > +[basic.lookup.elab] applies, or
> > > +

Re: [PATCH v20 23/26] c++: Implement __is_invocable built-in trait

2024-05-03 Thread Ken Matsui
On Fri, May 3, 2024 at 12:38 PM Jason Merrill  wrote:
>
> On 5/2/24 23:25, Ken Matsui wrote:
> > Addressed Jason's review comments.  Ok for trunk?
> >
> > -- >8 --
> >
> > This patch implements built-in trait for std::is_invocable.
> >
> > gcc/cp/ChangeLog:
> >
> >   * cp-trait.def: Define __is_invocable.
> >   * constraint.cc (diagnose_trait_expr): Handle CPTK_IS_INVOCABLE.
> >   * semantics.cc (trait_expr_value): Likewise.
> >   (finish_trait_expr): Likewise.
> >   * cp-tree.h (build_invoke): New function.
> >   * method.cc (build_invoke): New function.
> >
> > gcc/testsuite/ChangeLog:
> >
> >   * g++.dg/ext/has-builtin-1.C: Test existence of __is_invocable.
> >   * g++.dg/ext/is_invocable1.C: New test.
> >   * g++.dg/ext/is_invocable2.C: New test.
> >   * g++.dg/ext/is_invocable3.C: New test.
> >   * g++.dg/ext/is_invocable4.C: New test.
> >
> > Signed-off-by: Ken Matsui 
> > ---
> >   gcc/cp/constraint.cc |   6 +
> >   gcc/cp/cp-trait.def  |   1 +
> >   gcc/cp/cp-tree.h |   2 +
> >   gcc/cp/method.cc | 138 +
> >   gcc/cp/semantics.cc  |   5 +
> >   gcc/testsuite/g++.dg/ext/has-builtin-1.C |   3 +
> >   gcc/testsuite/g++.dg/ext/is_invocable1.C | 349 +++
> >   gcc/testsuite/g++.dg/ext/is_invocable2.C | 139 +
> >   gcc/testsuite/g++.dg/ext/is_invocable3.C |  51 
> >   gcc/testsuite/g++.dg/ext/is_invocable4.C |  33 +++
> >   10 files changed, 727 insertions(+)
> >   create mode 100644 gcc/testsuite/g++.dg/ext/is_invocable1.C
> >   create mode 100644 gcc/testsuite/g++.dg/ext/is_invocable2.C
> >   create mode 100644 gcc/testsuite/g++.dg/ext/is_invocable3.C
> >   create mode 100644 gcc/testsuite/g++.dg/ext/is_invocable4.C
> >
> > diff --git a/gcc/cp/constraint.cc b/gcc/cp/constraint.cc
> > index c28d7bf428e..6d14ef7dcc7 100644
> > --- a/gcc/cp/constraint.cc
> > +++ b/gcc/cp/constraint.cc
> > @@ -3792,6 +3792,12 @@ diagnose_trait_expr (tree expr, tree args)
> >   case CPTK_IS_FUNCTION:
> > inform (loc, "  %qT is not a function", t1);
> > break;
> > +case CPTK_IS_INVOCABLE:
> > +  if (!t2)
> > +inform (loc, "  %qT is not invocable", t1);
> > +  else
> > +inform (loc, "  %qT is not invocable by %qE", t1, t2);
> > +  break;
> >   case CPTK_IS_LAYOUT_COMPATIBLE:
> > inform (loc, "  %qT is not layout compatible with %qT", t1, t2);
> > break;
> > diff --git a/gcc/cp/cp-trait.def b/gcc/cp/cp-trait.def
> > index b1c875a6e7d..4e420d5390a 100644
> > --- a/gcc/cp/cp-trait.def
> > +++ b/gcc/cp/cp-trait.def
> > @@ -75,6 +75,7 @@ DEFTRAIT_EXPR (IS_EMPTY, "__is_empty", 1)
> >   DEFTRAIT_EXPR (IS_ENUM, "__is_enum", 1)
> >   DEFTRAIT_EXPR (IS_FINAL, "__is_final", 1)
> >   DEFTRAIT_EXPR (IS_FUNCTION, "__is_function", 1)
> > +DEFTRAIT_EXPR (IS_INVOCABLE, "__is_invocable", -1)
> >   DEFTRAIT_EXPR (IS_LAYOUT_COMPATIBLE, "__is_layout_compatible", 2)
> >   DEFTRAIT_EXPR (IS_LITERAL_TYPE, "__is_literal_type", 1)
> >   DEFTRAIT_EXPR (IS_MEMBER_FUNCTION_POINTER, 
> > "__is_member_function_pointer", 1)
> > diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
> > index 1938ada0268..83dc20e1130 100644
> > --- a/gcc/cp/cp-tree.h
> > +++ b/gcc/cp/cp-tree.h
> > @@ -7338,6 +7338,8 @@ extern tree get_copy_assign 
> > (tree);
> >   extern tree get_default_ctor(tree);
> >   extern tree get_dtor(tree, 
> > tsubst_flags_t);
> >   extern tree build_stub_object   (tree);
> > +extern tree build_invoke (tree, const_tree,
> > +  tsubst_flags_t);
> >   extern tree strip_inheriting_ctors  (tree);
> >   extern tree inherited_ctor_binfo(tree);
> >   extern bool base_ctor_omit_inherited_parms  (tree);
> > diff --git a/gcc/cp/method.cc b/gcc/cp/method.cc
> > index 08a3d34fb01..6bd590707b0 100644
> > --- a/gcc/cp/method.cc
> > +++ b/gcc/cp/method.cc
> > @@ -1928,6 +1928,144 @@ build_trait_object (tree type)
> > return build_stub_object (type);
> >   }
> >
> > +/* [func.require] Build an expression of INVOKE(FN_TYPE, ARG_TYPES...).  
> > If the
> > +   given is not invocable, returns error_mark_node.  */
> > +
> > +tree
> > +build_invoke (tree fn_type, const_tree arg_types, tsubst_flags_t complain)
> > +{
> > +  if (error_operand_p (fn_type) || error_operand_p (arg_types))
> > +return error_mark_node;
> > +
> > +  gcc_assert (TYPE_P (fn_type));
> > +  gcc_assert (TREE_CODE (arg_types) == TREE_VEC);
> > +
> > +  /* Access check is required to determine if the given is invocable.  */
> > +  deferring_access_check_sentinel acs (dk_no_deferred);
> > +
> > +  /* INVOKE is an unevaluated context.  */
> > +  cp_unevaluated cp_uneval_guard;
> > +
> > +  bool is_ptrdatamem;
> > +  bool is_ptrmemfunc;
> > +  if (TREE_CODE (fn_type) == 

Results for 13.2.1 20240503 [releases/gcc-13 r13-8684-g704b15e277] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-05-03 Thread Bill Seurer (POWER8) via Gcc-testresults
/pr54693-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 21 y == 
20 - 2 * i
FAIL: gcc.dg/guality/pr56154-1.c  -Og -DPREVENT_OPTIMIZATION  line 
pr56154-1.c:20 x.a == 6
FAIL: gcc.dg/guality/pr59776.c  -Og -DPREVENT_OPTIMIZATION  line pr59776.c:17 
s1.f == 5.0
FAIL: gcc.dg/guality/pr59776.c  -Og -DPREVENT_OPTIMIZATION  line pr59776.c:17 
s1.g == 6.0
FAIL: gcc.dg/guality/pr59776.c  -Og -DPREVENT_OPTIMIZATION  line pr59776.c:17 
s2.f == 0.0
FAIL: gcc.dg/guality/pr59776.c  -Og -DPREVENT_OPTIMIZATION  line pr59776.c:20 
s1.f == 5.0
FAIL: gcc.dg/guality/pr59776.c  -Og -DPREVENT_OPTIMIZATION  line pr59776.c:20 
s1.g == 6.0
FAIL: gcc.dg/guality/pr59776.c  -Og -DPREVENT_OPTIMIZATION  line pr59776.c:20 
s2.f == 5.0
FAIL: gcc.dg/guality/pr68860-1.c   -O2  -DPREVENT_OPTIMIZATION  line 16 y == 2
FAIL: gcc.dg/guality/pr68860-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr68860-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr68860-1.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 y == 
2
FAIL: gcc.dg/guality/pr68860-1.c   -Os  -DPREVENT_OPTIMIZATION  line 16 y == 2
FAIL: gcc.dg/guality/pr68860-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 16 y == 2
FAIL: gcc.dg/guality/pr68860-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 y == 
2
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 21 a.i == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 21 a.j == 14
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 32 a[0] == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 32 a[1] == 14
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 43 a.i == 4
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 43 a.j == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 21 a.i == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 21 a.j == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 32 a[0] == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 32 a[1] == 14
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 43 a.i == 4
FAIL: gcc.dg/guality/sra-1.c  -Og -DPREVENT_OPTIMIZATION  line 43 a.j == 14
FAIL: gcc.dg/torture/pr52451.c   -O0  execution test
FAIL: gcc.dg/torture/pr52451.c   -O1  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr52451.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr52451.c   -Os  execution test
FAIL: gcc.dg/torture/pr91323.c   -O0  execution test
FAIL: gcc.dg/torture/pr91323.c   -O1  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr91323.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr91323.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr91323.c   -Os  execution test
XPASS: gcc.dg/tree-ssa/ssa-dom-cse-2.c scan-tree-dump optimized "return 28;"
FAIL: gcc.target/powerpc/pr105586.c (test for excess errors)
FAIL: gcc.target/powerpc/rlwimi-2.c scan-assembler-times (?n)^s+[a-z] 20217
FAIL: gcc.target/powerpc/rs6000-fpint.c scan-assembler-not stfiwx
XPASS: gcc.target/powerpc/ppc-fortran/ieee128-math.f90   -O  (test for excess 
errors)

=== gcc Summary ===

# of expected passes168923
# of unexpected failures128
# of unexpected successes   16
# of expected failures  1550
# of unsupported tests  3992
/home/gccbuild/build/nightly/build-gcc-13/gcc/xgcc  version 13.2.1 20240503 
[releases/gcc-13 r13-8684-g704b15e277] (GCC) 

=== gfortran tests ===


Running target unix
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O0  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O1  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O2  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -Os  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O0  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O1  execution test
FAIL: gfortran.dg/ieee/large_2

RE: [PATCH] DCE __cxa_atexit calls where the function is pure/const [PR19661]

2024-05-03 Thread Andrew Pinski (QUIC)


> -Original Message-
> From: Jeff Law 
> Sent: Friday, May 3, 2024 7:53 AM
> To: Andrew Pinski (QUIC) ; gcc-
> patc...@gcc.gnu.org
> Subject: Re: [PATCH] DCE __cxa_atexit calls where the function is pure/const
> [PR19661]
> 
> 
> 
> On 5/2/24 3:56 PM, Andrew Pinski wrote:
> > In C++ sometimes you have a deconstructor function which is "empty",
> > like for an example with unions or with arrays.  The front-end might
> > not know it is empty either so this should be done on during
> > optimization.o To implement it I added it to DCE where we mark if a
> statement is necessary or not.
> >
> > Bootstrapped and tested on x86_64-linux-gnu with no regressions.
> >
> > PR tree-optimization/19661
> >
> > gcc/ChangeLog:
> >
> > * tree-ssa-dce.cc (is_cxa_atexit): New function.
> > (is_removable_cxa_atexit_call): New function.
> > (mark_stmt_if_obviously_necessary): Don't mark removable
> > cxa_at_exit calls.
> > (mark_all_reaching_defs_necessary_1): Likewise.
> > (propagate_necessity): Likewise.
> >
> > gcc/testsuite/ChangeLog:
> >
> > * g++.dg/tree-ssa/cxa_atexit-1.C: New test.
> > * g++.dg/tree-ssa/cxa_atexit-2.C: New test.
> > * g++.dg/tree-ssa/cxa_atexit-3.C: New test.
> > * g++.dg/tree-ssa/cxa_atexit-4.C: New test.
> > * g++.dg/tree-ssa/cxa_atexit-5.C: New test.
> OK

I have 2 issues reported to me before I pushed this so I am going to fix/check 
on them before pushing this.
The first one is the testcase fails on arm-linux-eabi since it uses 
__eabi_atexit rather than __cxa_atexit (I think the order of arguments for that 
function is slightly different too).
The second one is making sure the function will bind locally (or the user had 
the attribute on the function).
I should have a new patch Monday or Tuesday.

Thanks,
Andrew Pinski

> jeff



[Bug libbacktrace/114941] libbacktrace build is broken for FDPIC uclibc targets by r14-5173-g2b64e4a54042

2024-05-03 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114941

--- Comment #1 from Andrew Pinski  ---
So a patch like what was done in r0-56719-g34208acf14fa02 needs to be done to
libbacktrace . Basically this has always been broken.

[Bug libbacktrace/114941] New: libbacktrace build is broken for FDPIC uclibc targets by gcc-14-5173-g2b64e4a54042

2024-05-03 Thread jcmvbkbc at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114941

Bug ID: 114941
   Summary: libbacktrace build is broken for FDPIC uclibc targets
by gcc-14-5173-g2b64e4a54042
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libbacktrace
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jcmvbkbc at gcc dot gnu.org
CC: ian at gcc dot gnu.org
  Target Milestone: ---

A fix for the https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111315 turned on the
use of the dl_iterate_phdr interface in the libbacktrace, but since the type of
the dl_phdr_info::dlpi_addr on FDPIC targets using uclibc is not compatible
with uintptr_t the libstdc++-v3 build breaks for these targets with the
following message:

elf.c:7372:62: error: incompatible type for argument 6 of ‘elf_add’
 7372 |   if (elf_add (pd->state, filename, descriptor, NULL, 0,
info->dlpi_addr,
  | 
^~~
  |  |
  |  struct
elf32_fdpic_loadaddr
elf.c:6504:20: note: expected ‘uintptr_t’ {aka ‘unsigned int’} but argument is
of type ‘struct elf32_fdpic_loadaddr’

[Bug libstdc++/114940] std::generator relies on an optional overload of operator delete

2024-05-03 Thread liuxf19 at 163 dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114940

--- Comment #4 from Timothy Liu Xuefeng  ---
(In reply to Jonathan Wakely from comment #2)
> It's not optional, it's a required feature in C++14 and later. Failing to
> provide it is non-conforming, although GCC can be requested to be
> non-conforming the same way with -fno-sized-deallocation. Using that, the
> same error happens with GCC.
> 
> We should either disable __cpp_lib_generator when __cpp_sized_deallocation
> is not defined, or change  to not depend on it unconditionally.

Yeah, I agree. Since -fsized-deallocation is not the default behavior of
clang++, reporting errors in  seems strange.

[Bug c++/114935] [14/15 regression] Miscompilation of initializer_list in presence of exceptions since r14-1705-g2764335bd336f2

2024-05-03 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114935

Jason Merrill  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #4 from Jason Merrill  ---
Fixed.

Results for 15.0.0 20240503 (experimental) [remotes/origin/HEAD r15-133-g467ca4a195] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-05-03 Thread Bill Seurer (POWER9 IEEE128) via Gcc-testresults
/torture/pr52451.c   -O1  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  execution test
FAIL: gcc.dg/torture/pr52451.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  execution test
FAIL: gcc.dg/torture/pr52451.c   -O3 -g  execution test
FAIL: gcc.dg/torture/pr52451.c   -Os  execution test
FAIL: gcc.dg/tree-ssa/abs-4.c scan-tree-dump-times optimized "= -" 1
FAIL: gcc.dg/tree-ssa/abs-4.c scan-tree-dump-times optimized "= .COPYSIGN" 2
FAIL: gcc.dg/tree-ssa/abs-4.c scan-tree-dump-times optimized "= ABS_EXPR" 1
FAIL: gcc.dg/tree-ssa/backprop-6.c scan-tree-dump-times backprop 
"Deleting[^n]* = -" 4
FAIL: gcc.dg/tree-ssa/backprop-6.c scan-tree-dump-times backprop 
"Deleting[^n]* = ABS_EXPR <" 1
FAIL: gcc.dg/tree-ssa/backprop-6.c scan-tree-dump-times backprop 
"Deleting[^n]* = .COPYSIGN" 2
XPASS: gcc.dg/tree-ssa/ssa-dom-cse-2.c scan-tree-dump optimized "return 28;"
FAIL: gcc.dg/tree-ssa/update-threading.c scan-tree-dump-times optimized 
"Invalid sum" 0
FAIL: gcc.dg/vect/vect-117.c -flto -ffat-lto-objects  scan-tree-dump-not 
optimized "Invalid sum"
FAIL: gcc.dg/vect/vect-117.c scan-tree-dump-not optimized "Invalid sum"
FAIL: gcc.target/powerpc/pr105334.c (test for excess errors)
FAIL: gcc.target/powerpc/rlwimi-2.c scan-assembler-times (?n)^s+[a-z] 20217
XPASS: gcc.target/powerpc/ppc-fortran/ieee128-math.f90   -O  (test for excess 
errors)

=== gcc Summary ===

# of expected passes179482
# of unexpected failures90
# of unexpected successes   20
# of expected failures  1619
# of unsupported tests  4251
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xgcc  version 15.0.0 20240503 
(experimental) [remotes/origin/HEAD r15-133-g467ca4a195] (GCC) 

=== gfortran tests ===


Running target unix
XPASS: gfortran.dg/default_format_2.f90   -O0  execution test
XPASS: gfortran.dg/default_format_2.f90   -O1  execution test
XPASS: gfortran.dg/default_format_2.f90   -O2  execution test
XPASS: gfortran.dg/default_format_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/default_format_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/default_format_2.f90   -Os  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O0  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O1  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O2  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/default_format_denormal_2.f90   -Os  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O0  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O1  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O2  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -O3 -g  execution test
XPASS: gfortran.dg/large_real_kind_form_io_2.f90   -Os  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O0  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O1  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O2  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O3 -fomit-frame-pointer 
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -O3 -g  execution test
FAIL: gfortran.dg/ieee/comparisons_3.F90   -Os  execution test

=== gfortran Summary ===

# of expected passes69847
# of unexpected failures6
# of unexpected successes   18
# of expected failures  273
# of unsupported tests  177
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/gfortran  version 15.0.0 
20240503 (experimental) [remotes/origin/HEAD r15-133-g467ca4a195] (GCC) 

=== g++ tests ===


Running target unix

=== g++ Summary ===

# of expected passes260351
# of expected failures  2620
# of unsupported tests  11684
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xg++  version 15.0.0 20240503 
(experimental) [remotes/origin/HEAD r15-133-g467ca4a195] (GCC) 

=== obj-c++ tests ===


Running target unix

=== obj-c++ Summary ===

# of expected passes1503
# of expected failures  10
# of unsupported tests  79
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xg++  version 15.0.0 20240503 
(experimental) [re

[Bug c++/114935] [14/15 regression] Miscompilation of initializer_list in presence of exceptions since r14-1705-g2764335bd336f2

2024-05-03 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114935

--- Comment #3 from GCC Commits  ---
The releases/gcc-14 branch has been updated by Jason Merrill
:

https://gcc.gnu.org/g:3b4d6b6ecd79df790bf0938dab1f51094f94d777

commit r14-10165-g3b4d6b6ecd79df790bf0938dab1f51094f94d777
Author: Jason Merrill 
Date:   Fri May 3 09:52:46 2024 -0400

c++: initializer_list and EH [PR114935]

When we initialize an array of a type with a non-trivial destructor, such
as
the backing array for the initializer_list, we have a cleanup to destroy
any
constructed elements if a later constructor throws.  When the array being
created is a variable, the end of that EH region naturally coincides with
the beginning of the EH region for the cleanup for the variable as a whole.

But if the array is a temporary, or a subobject of one, the array cleanup
region lasts for the rest of the full-expression, along with the normal
cleanup for the TARGET_EXPR.  As a result, when tata throws we clean it up
twice.  Before r14-1705 we avoided this by disabling the array cleanup in
split_nonconstant_init, but after that we don't go through
split_nonconstant_init, so let's handle it in cp_genericize_target_expr.

PR c++/114935

gcc/cp/ChangeLog:

* cp-gimplify.cc (cp_genericize_init): Add flags parm.
(cp_genericize_init_expr): Pass nullptr.
(cp_genericize_target_expr): Handle cleanup flags.
* typeck2.cc (build_disable_temp_cleanup): Factor out of...
(split_nonconstant_init): ...here.
* cp-tree.h (build_disable_temp_cleanup): Declare.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/initlist-eh1.C: New test.

(cherry picked from commit 8f3afb83c879f1bfa722a963a07c06aaf174ef72)

[gcc r14-10165] c++: initializer_list and EH [PR114935]

2024-05-03 Thread Jason Merrill via Gcc-cvs
https://gcc.gnu.org/g:3b4d6b6ecd79df790bf0938dab1f51094f94d777

commit r14-10165-g3b4d6b6ecd79df790bf0938dab1f51094f94d777
Author: Jason Merrill 
Date:   Fri May 3 09:52:46 2024 -0400

c++: initializer_list and EH [PR114935]

When we initialize an array of a type with a non-trivial destructor, such as
the backing array for the initializer_list, we have a cleanup to destroy any
constructed elements if a later constructor throws.  When the array being
created is a variable, the end of that EH region naturally coincides with
the beginning of the EH region for the cleanup for the variable as a whole.

But if the array is a temporary, or a subobject of one, the array cleanup
region lasts for the rest of the full-expression, along with the normal
cleanup for the TARGET_EXPR.  As a result, when tata throws we clean it up
twice.  Before r14-1705 we avoided this by disabling the array cleanup in
split_nonconstant_init, but after that we don't go through
split_nonconstant_init, so let's handle it in cp_genericize_target_expr.

PR c++/114935

gcc/cp/ChangeLog:

* cp-gimplify.cc (cp_genericize_init): Add flags parm.
(cp_genericize_init_expr): Pass nullptr.
(cp_genericize_target_expr): Handle cleanup flags.
* typeck2.cc (build_disable_temp_cleanup): Factor out of...
(split_nonconstant_init): ...here.
* cp-tree.h (build_disable_temp_cleanup): Declare.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/initlist-eh1.C: New test.

(cherry picked from commit 8f3afb83c879f1bfa722a963a07c06aaf174ef72)

Diff:
---
 gcc/cp/cp-tree.h  |  1 +
 gcc/cp/cp-gimplify.cc | 18 
 gcc/cp/typeck2.cc | 34 ++-
 gcc/testsuite/g++.dg/cpp0x/initlist-eh1.C | 25 +++
 4 files changed, 60 insertions(+), 18 deletions(-)

diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index bafdf63dc63..a226a0a9fb6 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -8406,6 +8406,7 @@ extern int abstract_virtuals_error
(abstract_class_use, tree,
 tsubst_flags_t = 
tf_warning_or_error);
 
 extern tree store_init_value   (tree, tree, vec**, int);
+extern tree build_disable_temp_cleanup (tree);
 extern tree split_nonconstant_init (tree, tree);
 extern bool check_narrowing(tree, tree, tsubst_flags_t,
 bool = false);
diff --git a/gcc/cp/cp-gimplify.cc b/gcc/cp/cp-gimplify.cc
index ab5acd18c99..5cbdf0ea498 100644
--- a/gcc/cp/cp-gimplify.cc
+++ b/gcc/cp/cp-gimplify.cc
@@ -1063,11 +1063,11 @@ any_non_eliding_target_exprs (tree ctor)
the result.  */
 
 static void
-cp_genericize_init (tree *replace, tree from, tree to)
+cp_genericize_init (tree *replace, tree from, tree to, vec** flags)
 {
   tree init = NULL_TREE;
   if (TREE_CODE (from) == VEC_INIT_EXPR)
-init = expand_vec_init_expr (to, from, tf_warning_or_error);
+init = expand_vec_init_expr (to, from, tf_warning_or_error, flags);
   else if (TREE_CODE (from) == CONSTRUCTOR
   && TREE_SIDE_EFFECTS (from)
   && ((flag_exceptions
@@ -1101,7 +1101,7 @@ cp_genericize_init_expr (tree *stmt_p)
   /* Return gets confused if we clobber its INIT_EXPR this soon.  */
   && TREE_CODE (to) != RESULT_DECL)
 from = TARGET_EXPR_INITIAL (from);
-  cp_genericize_init (stmt_p, from, to);
+  cp_genericize_init (stmt_p, from, to, nullptr);
 }
 
 /* For a TARGET_EXPR, change the TARGET_EXPR_INITIAL.  We will need to use
@@ -1112,9 +1112,19 @@ cp_genericize_target_expr (tree *stmt_p)
 {
   iloc_sentinel ils = EXPR_LOCATION (*stmt_p);
   tree slot = TARGET_EXPR_SLOT (*stmt_p);
+  vec *flags = make_tree_vector ();
   cp_genericize_init (_EXPR_INITIAL (*stmt_p),
- TARGET_EXPR_INITIAL (*stmt_p), slot);
+ TARGET_EXPR_INITIAL (*stmt_p), slot, );
   gcc_assert (!DECL_INITIAL (slot));
+  for (tree f : flags)
+{
+  /* Once initialization is complete TARGET_EXPR_CLEANUP becomes active, so
+disable any subobject cleanups.  */
+  tree d = build_disable_temp_cleanup (f);
+  auto  = TARGET_EXPR_INITIAL (*stmt_p);
+  r = add_stmt_to_compound (r, d);
+}
+  release_tree_vector (flags);
 }
 
 /* Similar to if (target_expr_needs_replace) replace_decl, but TP is the
diff --git a/gcc/cp/typeck2.cc b/gcc/cp/typeck2.cc
index 2985bfdf9ec..06bad4d3303 100644
--- a/gcc/cp/typeck2.cc
+++ b/gcc/cp/typeck2.cc
@@ -466,6 +466,25 @@ maybe_push_temp_cleanup (tree sub, vec **flags)
 }
 }
 
+/* F is something added to a cleanup flags vec by maybe_push_temp_cleanup or
+   build_vec_init.  Return the code to disable the cleanup it controls.  */
+
+tree
+build_disable_temp_cleanup (tree f)

[gcc r15-138] c++: initializer_list and EH [PR114935]

2024-05-03 Thread Jason Merrill via Gcc-cvs
https://gcc.gnu.org/g:8f3afb83c879f1bfa722a963a07c06aaf174ef72

commit r15-138-g8f3afb83c879f1bfa722a963a07c06aaf174ef72
Author: Jason Merrill 
Date:   Fri May 3 09:52:46 2024 -0400

c++: initializer_list and EH [PR114935]

When we initialize an array of a type with a non-trivial destructor, such as
the backing array for the initializer_list, we have a cleanup to destroy any
constructed elements if a later constructor throws.  When the array being
created is a variable, the end of that EH region naturally coincides with
the beginning of the EH region for the cleanup for the variable as a whole.

But if the array is a temporary, or a subobject of one, the array cleanup
region lasts for the rest of the full-expression, along with the normal
cleanup for the TARGET_EXPR.  As a result, when tata throws we clean it up
twice.  Before r14-1705 we avoided this by disabling the array cleanup in
split_nonconstant_init, but after that we don't go through
split_nonconstant_init, so let's handle it in cp_genericize_target_expr.

PR c++/114935

gcc/cp/ChangeLog:

* cp-gimplify.cc (cp_genericize_init): Add flags parm.
(cp_genericize_init_expr): Pass nullptr.
(cp_genericize_target_expr): Handle cleanup flags.
* typeck2.cc (build_disable_temp_cleanup): Factor out of...
(split_nonconstant_init): ...here.
* cp-tree.h (build_disable_temp_cleanup): Declare.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/initlist-eh1.C: New test.

Diff:
---
 gcc/cp/cp-tree.h  |  1 +
 gcc/cp/cp-gimplify.cc | 18 
 gcc/cp/typeck2.cc | 34 ++-
 gcc/testsuite/g++.dg/cpp0x/initlist-eh1.C | 25 +++
 4 files changed, 60 insertions(+), 18 deletions(-)

diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 1ba7054f8bc..52d6841559c 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -8411,6 +8411,7 @@ extern int abstract_virtuals_error
(abstract_class_use, tree,
 tsubst_flags_t = 
tf_warning_or_error);
 
 extern tree store_init_value   (tree, tree, vec**, int);
+extern tree build_disable_temp_cleanup (tree);
 extern tree split_nonconstant_init (tree, tree);
 extern bool check_narrowing(tree, tree, tsubst_flags_t,
 bool = false);
diff --git a/gcc/cp/cp-gimplify.cc b/gcc/cp/cp-gimplify.cc
index ab5acd18c99..5cbdf0ea498 100644
--- a/gcc/cp/cp-gimplify.cc
+++ b/gcc/cp/cp-gimplify.cc
@@ -1063,11 +1063,11 @@ any_non_eliding_target_exprs (tree ctor)
the result.  */
 
 static void
-cp_genericize_init (tree *replace, tree from, tree to)
+cp_genericize_init (tree *replace, tree from, tree to, vec** flags)
 {
   tree init = NULL_TREE;
   if (TREE_CODE (from) == VEC_INIT_EXPR)
-init = expand_vec_init_expr (to, from, tf_warning_or_error);
+init = expand_vec_init_expr (to, from, tf_warning_or_error, flags);
   else if (TREE_CODE (from) == CONSTRUCTOR
   && TREE_SIDE_EFFECTS (from)
   && ((flag_exceptions
@@ -1101,7 +1101,7 @@ cp_genericize_init_expr (tree *stmt_p)
   /* Return gets confused if we clobber its INIT_EXPR this soon.  */
   && TREE_CODE (to) != RESULT_DECL)
 from = TARGET_EXPR_INITIAL (from);
-  cp_genericize_init (stmt_p, from, to);
+  cp_genericize_init (stmt_p, from, to, nullptr);
 }
 
 /* For a TARGET_EXPR, change the TARGET_EXPR_INITIAL.  We will need to use
@@ -1112,9 +1112,19 @@ cp_genericize_target_expr (tree *stmt_p)
 {
   iloc_sentinel ils = EXPR_LOCATION (*stmt_p);
   tree slot = TARGET_EXPR_SLOT (*stmt_p);
+  vec *flags = make_tree_vector ();
   cp_genericize_init (_EXPR_INITIAL (*stmt_p),
- TARGET_EXPR_INITIAL (*stmt_p), slot);
+ TARGET_EXPR_INITIAL (*stmt_p), slot, );
   gcc_assert (!DECL_INITIAL (slot));
+  for (tree f : flags)
+{
+  /* Once initialization is complete TARGET_EXPR_CLEANUP becomes active, so
+disable any subobject cleanups.  */
+  tree d = build_disable_temp_cleanup (f);
+  auto  = TARGET_EXPR_INITIAL (*stmt_p);
+  r = add_stmt_to_compound (r, d);
+}
+  release_tree_vector (flags);
 }
 
 /* Similar to if (target_expr_needs_replace) replace_decl, but TP is the
diff --git a/gcc/cp/typeck2.cc b/gcc/cp/typeck2.cc
index 2985bfdf9ec..06bad4d3303 100644
--- a/gcc/cp/typeck2.cc
+++ b/gcc/cp/typeck2.cc
@@ -466,6 +466,25 @@ maybe_push_temp_cleanup (tree sub, vec **flags)
 }
 }
 
+/* F is something added to a cleanup flags vec by maybe_push_temp_cleanup or
+   build_vec_init.  Return the code to disable the cleanup it controls.  */
+
+tree
+build_disable_temp_cleanup (tree f)
+{
+  tree d = f;
+  tree i = boolean_false_node;
+  if (TREE_CODE (f) == 

[pushed] c++: initializer_list and EH [PR114935]

2024-05-03 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk and 14.

-- 8< --

When we initialize an array of a type with a non-trivial destructor, such as
the backing array for the initializer_list, we have a cleanup to destroy any
constructed elements if a later constructor throws.  When the array being
created is a variable, the end of that EH region naturally coincides with
the beginning of the EH region for the cleanup for the variable as a whole.

But if the array is a temporary, or a subobject of one, the array cleanup
region lasts for the rest of the full-expression, along with the normal
cleanup for the TARGET_EXPR.  As a result, when tata throws we clean it up
twice.  Before r14-1705 we avoided this by disabling the array cleanup in
split_nonconstant_init, but after that we don't go through
split_nonconstant_init, so let's handle it in cp_genericize_target_expr.

PR c++/114935

gcc/cp/ChangeLog:

* cp-gimplify.cc (cp_genericize_init): Add flags parm.
(cp_genericize_init_expr): Pass nullptr.
(cp_genericize_target_expr): Handle cleanup flags.
* typeck2.cc (build_disable_temp_cleanup): Factor out of...
(split_nonconstant_init): ...here.
* cp-tree.h (build_disable_temp_cleanup): Declare.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/initlist-eh1.C: New test.
---
 gcc/cp/cp-tree.h  |  1 +
 gcc/cp/cp-gimplify.cc | 18 +---
 gcc/cp/typeck2.cc | 34 +--
 gcc/testsuite/g++.dg/cpp0x/initlist-eh1.C | 25 +
 4 files changed, 60 insertions(+), 18 deletions(-)
 create mode 100644 gcc/testsuite/g++.dg/cpp0x/initlist-eh1.C

diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 1ba7054f8bc..52d6841559c 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -8411,6 +8411,7 @@ extern int abstract_virtuals_error
(abstract_class_use, tree,
 tsubst_flags_t = 
tf_warning_or_error);
 
 extern tree store_init_value   (tree, tree, vec**, int);
+extern tree build_disable_temp_cleanup (tree);
 extern tree split_nonconstant_init (tree, tree);
 extern bool check_narrowing(tree, tree, tsubst_flags_t,
 bool = false);
diff --git a/gcc/cp/cp-gimplify.cc b/gcc/cp/cp-gimplify.cc
index ab5acd18c99..5cbdf0ea498 100644
--- a/gcc/cp/cp-gimplify.cc
+++ b/gcc/cp/cp-gimplify.cc
@@ -1063,11 +1063,11 @@ any_non_eliding_target_exprs (tree ctor)
the result.  */
 
 static void
-cp_genericize_init (tree *replace, tree from, tree to)
+cp_genericize_init (tree *replace, tree from, tree to, vec** flags)
 {
   tree init = NULL_TREE;
   if (TREE_CODE (from) == VEC_INIT_EXPR)
-init = expand_vec_init_expr (to, from, tf_warning_or_error);
+init = expand_vec_init_expr (to, from, tf_warning_or_error, flags);
   else if (TREE_CODE (from) == CONSTRUCTOR
   && TREE_SIDE_EFFECTS (from)
   && ((flag_exceptions
@@ -1101,7 +1101,7 @@ cp_genericize_init_expr (tree *stmt_p)
   /* Return gets confused if we clobber its INIT_EXPR this soon.  */
   && TREE_CODE (to) != RESULT_DECL)
 from = TARGET_EXPR_INITIAL (from);
-  cp_genericize_init (stmt_p, from, to);
+  cp_genericize_init (stmt_p, from, to, nullptr);
 }
 
 /* For a TARGET_EXPR, change the TARGET_EXPR_INITIAL.  We will need to use
@@ -1112,9 +1112,19 @@ cp_genericize_target_expr (tree *stmt_p)
 {
   iloc_sentinel ils = EXPR_LOCATION (*stmt_p);
   tree slot = TARGET_EXPR_SLOT (*stmt_p);
+  vec *flags = make_tree_vector ();
   cp_genericize_init (_EXPR_INITIAL (*stmt_p),
- TARGET_EXPR_INITIAL (*stmt_p), slot);
+ TARGET_EXPR_INITIAL (*stmt_p), slot, );
   gcc_assert (!DECL_INITIAL (slot));
+  for (tree f : flags)
+{
+  /* Once initialization is complete TARGET_EXPR_CLEANUP becomes active, so
+disable any subobject cleanups.  */
+  tree d = build_disable_temp_cleanup (f);
+  auto  = TARGET_EXPR_INITIAL (*stmt_p);
+  r = add_stmt_to_compound (r, d);
+}
+  release_tree_vector (flags);
 }
 
 /* Similar to if (target_expr_needs_replace) replace_decl, but TP is the
diff --git a/gcc/cp/typeck2.cc b/gcc/cp/typeck2.cc
index 2985bfdf9ec..06bad4d3303 100644
--- a/gcc/cp/typeck2.cc
+++ b/gcc/cp/typeck2.cc
@@ -466,6 +466,25 @@ maybe_push_temp_cleanup (tree sub, vec **flags)
 }
 }
 
+/* F is something added to a cleanup flags vec by maybe_push_temp_cleanup or
+   build_vec_init.  Return the code to disable the cleanup it controls.  */
+
+tree
+build_disable_temp_cleanup (tree f)
+{
+  tree d = f;
+  tree i = boolean_false_node;
+  if (TREE_CODE (f) == TREE_LIST)
+{
+  /* To disable a build_vec_init cleanup, set
+iterator = maxindex.  */
+  d = TREE_PURPOSE (f);
+  i = TREE_VALUE (f);
+  ggc_free (f);
+}
+  return build2 (MODIFY_EXPR, TREE_TYPE (d), d, i);
+}
+
 

[Bug c++/114935] [14/15 regression] Miscompilation of initializer_list in presence of exceptions since r14-1705-g2764335bd336f2

2024-05-03 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114935

--- Comment #2 from GCC Commits  ---
The trunk branch has been updated by Jason Merrill :

https://gcc.gnu.org/g:8f3afb83c879f1bfa722a963a07c06aaf174ef72

commit r15-138-g8f3afb83c879f1bfa722a963a07c06aaf174ef72
Author: Jason Merrill 
Date:   Fri May 3 09:52:46 2024 -0400

c++: initializer_list and EH [PR114935]

When we initialize an array of a type with a non-trivial destructor, such
as
the backing array for the initializer_list, we have a cleanup to destroy
any
constructed elements if a later constructor throws.  When the array being
created is a variable, the end of that EH region naturally coincides with
the beginning of the EH region for the cleanup for the variable as a whole.

But if the array is a temporary, or a subobject of one, the array cleanup
region lasts for the rest of the full-expression, along with the normal
cleanup for the TARGET_EXPR.  As a result, when tata throws we clean it up
twice.  Before r14-1705 we avoided this by disabling the array cleanup in
split_nonconstant_init, but after that we don't go through
split_nonconstant_init, so let's handle it in cp_genericize_target_expr.

PR c++/114935

gcc/cp/ChangeLog:

* cp-gimplify.cc (cp_genericize_init): Add flags parm.
(cp_genericize_init_expr): Pass nullptr.
(cp_genericize_target_expr): Handle cleanup flags.
* typeck2.cc (build_disable_temp_cleanup): Factor out of...
(split_nonconstant_init): ...here.
* cp-tree.h (build_disable_temp_cleanup): Declare.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/initlist-eh1.C: New test.

[Bug libstdc++/114940] std::generator relies on an optional overload of operator delete

2024-05-03 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114940

--- Comment #3 from Jonathan Wakely  ---
P.S. what's optional is whether the compiler chooses to use that overload or
not. But its presence is required for conformance.

[Bug libstdc++/114940] std::generator relies on an optional overload of operator delete

2024-05-03 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114940

Jonathan Wakely  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2024-05-03
 CC||arsen at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #2 from Jonathan Wakely  ---
It's not optional, it's a required feature in C++14 and later. Failing to
provide it is non-conforming, although GCC can be requested to be
non-conforming the same way with -fno-sized-deallocation. Using that, the same
error happens with GCC.

We should either disable __cpp_lib_generator when __cpp_sized_deallocation is
not defined, or change  to not depend on it unconditionally.

[Bug libstdc++/114940] std::generator relies on an optional overload of operator delete

2024-05-03 Thread liuxf19 at 163 dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114940

--- Comment #1 from Timothy Liu Xuefeng  ---
It seems that passing -fsized-deallocation to clang++ can resolve this problem.
But it seems that it's not the default behavior.

[PATCH] AARCH64: Add Qualcomnm oryon-1 core

2024-05-03 Thread Andrew Pinski
This patch adds Qualcomm's new oryon-1 core; this is enough
to recongize the core and later on will add the tuning structure.

gcc/ChangeLog:

* config/aarch64/aarch64-cores.def (oryon-1): New entry.
* config/aarch64/aarch64-tune.md: Regenerate.
* doc/invoke.texi  (AArch64 Options): Document oryon-1.

Signed-off-by: Andrew Pinski 
Co-authored-by: Joel Jones 
Co-authored-by: Wei Zhao 
---
 gcc/config/aarch64/aarch64-cores.def | 5 +
 gcc/config/aarch64/aarch64-tune.md   | 2 +-
 gcc/doc/invoke.texi  | 1 +
 3 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/gcc/config/aarch64/aarch64-cores.def 
b/gcc/config/aarch64/aarch64-cores.def
index f69fc212d56..be60929e400 100644
--- a/gcc/config/aarch64/aarch64-cores.def
+++ b/gcc/config/aarch64/aarch64-cores.def
@@ -151,6 +151,11 @@ AARCH64_CORE("neoverse-512tvb", neoverse512tvb, cortexa57, 
V8_4A,  (SVE, I8MM, B
 /* Qualcomm ('Q') cores. */
 AARCH64_CORE("saphira", saphira,saphira,V8_4A,  (CRYPTO), saphira, 
  0x51, 0xC01, -1)
 
+/* ARMv8.6-A Architecture Processors.  */
+
+/* Qualcomm ('Q') cores. */
+AARCH64_CORE("oryon-1", oryon1, cortexa57, V8_6A, (CRYPTO, SM4, SHA3, F16), 
cortexa72,   0x51, 0x001, -1)
+
 /* ARMv8-A big.LITTLE implementations.  */
 
 AARCH64_CORE("cortex-a57.cortex-a53",  cortexa57cortexa53, cortexa53, V8A,  
(CRC), cortexa57, 0x41, AARCH64_BIG_LITTLE (0xd07, 0xd03), -1)
diff --git a/gcc/config/aarch64/aarch64-tune.md 
b/gcc/config/aarch64/aarch64-tune.md
index abd3c9e0822..ba940f1c890 100644
--- a/gcc/config/aarch64/aarch64-tune.md
+++ b/gcc/config/aarch64/aarch64-tune.md
@@ -1,5 +1,5 @@
 ;; -*- buffer-read-only: t -*-
 ;; Generated automatically by gentune.sh from aarch64-cores.def
 (define_attr "tune"
-   
"cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,ampere1b,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,cortexx1c,neoversen1,ares,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,tsv110,thunderx3t110,neoversev1,zeus,neoverse512tvb,saphira,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,cortexa510,cortexa520,cortexa710,cortexa715,cortexa720,cortexx2,cortexx3,cortexx4,neoversen2,cobalt100,neoversev2,demeter,generic,generic_armv8_a,generic_armv9_a"
+   
"cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,ampere1,ampere1a,ampere1b,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa78,cortexa78ae,cortexa78c,cortexa65,cortexa65ae,cortexx1,cortexx1c,neoversen1,ares,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,tsv110,thunderx3t110,neoversev1,zeus,neoverse512tvb,saphira,oryon1,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55,cortexr82,cortexa510,cortexa520,cortexa710,cortexa715,cortexa720,cortexx2,cortexx3,cortexx4,neoversen2,cobalt100,neoversev2,demeter,generic,generic_armv8_a,generic_armv9_a"
(const (symbol_ref "((enum attr_tune) aarch64_tune)")))
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 9456ced468a..eabe09dc28f 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -21323,6 +21323,7 @@ performance of the code.  Permissible values for this 
option are:
 @samp{cortex-a65}, @samp{cortex-a65ae}, @samp{cortex-a34},
 @samp{cortex-a78}, @samp{cortex-a78ae}, @samp{cortex-a78c},
 @samp{ares}, @samp{exynos-m1}, @samp{emag}, @samp{falkor},
+@samp{oyron-1}, 
 @samp{neoverse-512tvb}, @samp{neoverse-e1}, @samp{neoverse-n1},
 @samp{neoverse-n2}, @samp{neoverse-v1}, @samp{neoverse-v2}, @samp{qdf24xx},
 @samp{saphira}, @samp{phecda}, @samp{xgene1}, @samp{vulcan},
-- 
2.43.0



[gcc r15-137] PR modula2/114929 extra for loop iteration count regression tests

2024-05-03 Thread Gaius Mulley via Gcc-cvs
https://gcc.gnu.org/g:c943d7b5c40f447b12431df9ad27a47dad95026d

commit r15-137-gc943d7b5c40f447b12431df9ad27a47dad95026d
Author: Gaius Mulley 
Date:   Fri May 3 20:48:01 2024 +0100

PR modula2/114929 extra for loop iteration count regression tests

This patch introduces three more for loop tests checking the iteration
count using the CHAR and enumeration data types.

gcc/testsuite/ChangeLog:

PR modula2/114929
* gm2/pim/run/pass/testforloopchar.mod: New test.
* gm2/pim/run/pass/testforloopchar2.mod: New test.
* gm2/pim/run/pass/testforloopenum.mod: New test.

Signed-off-by: Gaius Mulley 

Diff:
---
 gcc/testsuite/gm2/pim/run/pass/testforloopchar.mod | 27 +++
 .../gm2/pim/run/pass/testforloopchar2.mod  | 27 +++
 gcc/testsuite/gm2/pim/run/pass/testforloopenum.mod | 30 ++
 3 files changed, 84 insertions(+)

diff --git a/gcc/testsuite/gm2/pim/run/pass/testforloopchar.mod 
b/gcc/testsuite/gm2/pim/run/pass/testforloopchar.mod
new file mode 100644
index 000..be26ecb7149
--- /dev/null
+++ b/gcc/testsuite/gm2/pim/run/pass/testforloopchar.mod
@@ -0,0 +1,27 @@
+MODULE testforloopchar ;
+
+FROM libc IMPORT printf, exit ;
+
+PROCEDURE test ;
+VAR
+   ch   : CHAR ;
+   count: CARDINAL ;
+BEGIN
+   count := 0 ;
+   FOR ch := 'a' TO 'z' DO
+  INC (count) ;
+  printf ("ch = %c, count = %d\n", ch, count)
+   END ;
+   IF count = 26
+   THEN
+  printf ("passed\n")
+   ELSE
+  printf ("failed\n") ;
+  exit (1)
+   END
+END test ;
+
+
+BEGIN
+   test
+END testforloopchar.
diff --git a/gcc/testsuite/gm2/pim/run/pass/testforloopchar2.mod 
b/gcc/testsuite/gm2/pim/run/pass/testforloopchar2.mod
new file mode 100644
index 000..05478b2d5f2
--- /dev/null
+++ b/gcc/testsuite/gm2/pim/run/pass/testforloopchar2.mod
@@ -0,0 +1,27 @@
+MODULE testforloopchar2 ;
+
+FROM libc IMPORT printf, exit ;
+
+PROCEDURE test ;
+VAR
+   ch   : CHAR ;
+   count: CARDINAL ;
+BEGIN
+   count := 0 ;
+   FOR ch := 'a' TO 'z' BY CHR (2) DO
+  INC (count) ;
+  printf ("ch = %c, count = %d\n", ch, count)
+   END ;
+   IF count = 13
+   THEN
+  printf ("passed\n")
+   ELSE
+  printf ("failed\n") ;
+  exit (1)
+   END
+END test ;
+
+
+BEGIN
+   test
+END testforloopchar2.
diff --git a/gcc/testsuite/gm2/pim/run/pass/testforloopenum.mod 
b/gcc/testsuite/gm2/pim/run/pass/testforloopenum.mod
new file mode 100644
index 000..3855cae0012
--- /dev/null
+++ b/gcc/testsuite/gm2/pim/run/pass/testforloopenum.mod
@@ -0,0 +1,30 @@
+MODULE testforloopenum ;
+
+FROM libc IMPORT printf, exit ;
+
+TYPE
+   colour = (red, green, blue, yellow) ;
+
+PROCEDURE test ;
+VAR
+   c: colour ;
+   count: CARDINAL ;
+BEGIN
+   count := 0 ;
+   FOR c := red TO blue BY colour (2) DO
+  INC (count) ;
+  printf ("c = %d, count = %d\n", c, count)
+   END ;
+   IF count = 2
+   THEN
+  printf ("passed\n")
+   ELSE
+  printf ("failed\n") ;
+  exit (1)
+   END
+END test ;
+
+
+BEGIN
+   test
+END testforloopenum.


[Bug modula2/114929] for loop fails to iterate down to zero if a cardinal type (unsigned type) is used with a step of -1.

2024-05-03 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114929

--- Comment #5 from GCC Commits  ---
The master branch has been updated by Gaius Mulley :

https://gcc.gnu.org/g:c943d7b5c40f447b12431df9ad27a47dad95026d

commit r15-137-gc943d7b5c40f447b12431df9ad27a47dad95026d
Author: Gaius Mulley 
Date:   Fri May 3 20:48:01 2024 +0100

PR modula2/114929 extra for loop iteration count regression tests

This patch introduces three more for loop tests checking the iteration
count using the CHAR and enumeration data types.

gcc/testsuite/ChangeLog:

PR modula2/114929
* gm2/pim/run/pass/testforloopchar.mod: New test.
* gm2/pim/run/pass/testforloopchar2.mod: New test.
* gm2/pim/run/pass/testforloopenum.mod: New test.

Signed-off-by: Gaius Mulley 

[Bug libstdc++/77704] Data race on std::ctype

2024-05-03 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77704

--- Comment #10 from Jonathan Wakely  ---
(In reply to Boris Kolpackov from comment #5)
> For anyone interested, here is the workaround we came up with:
> 
> // A data race happens in the libstdc++ (as of GCC 7.2) implementation of the
> // ctype::narrow() function (bug #77704). The issue is easily
> triggered
> // by the testscript runner that indirectly (via regex) uses ctype
> facet
> // of the global locale (and can potentially be triggered by other locale-
> // aware code). We work around this by pre-initializing the global locale
> // facet internal cache.
> //
> #ifdef _GLIBCXX_
>   {
> const ctype& ct (use_facet> (locale ()));
> 
> for (size_t i (0); i != 256; ++i)
>   ct.narrow (static_cast (i), '\0');
>   }
> #endif

It would be better to call ct.narrow(0, 0, 0, 0) as that will populate the
_M_narrow array and also set the _M_narrow_ok flag. Otherwise you can still get
later races on the flag.

[Bug libstdc++/114940] New: std::generator relies on an optional overload of operator delete

2024-05-03 Thread liuxf19 at 163 dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114940

Bug ID: 114940
   Summary: std::generator relies on an optional overload of
operator delete
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libstdc++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: liuxf19 at 163 dot com
  Target Milestone: ---

The bug report #114891 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114891
discussed the impact of is_pointer_interconvertible_base_of_v on using
std::generator with clang++ and libstdc++. There's another issue when
std::generator in libstdc++ is used by other compilers such as clang++.

In the header , an overload of operator delete:
void operator delete  ( void* ptr, std::size_t sz ) noexcept;

However, this is an OPTIONAL feature whose feature test macro is
__cpp_sized_deallocation macro. Some compilers especially clang++, even the
newest  clang trunk (which is avaiable at https://godbolt.org, and the version
is 19.0.0) didn't implement this macro. For example, the code below:

#include 

int main() {
#ifndef __cpp_sized_deallocation
static_assert(false, "no __cpp_sized_deallocation");
#endif
}

compiled with: clang++ -std=c++23 -stdlib=libstdc++
will cause the following errors:

:5:19: error: static assertion failed: no __cpp_sized_deallocation
5 | static_assert(false, "no __cpp_sized_deallocation");
  |   ^
1 error generated.
ASM generation compiler returned: 1
:5:19: error: static assertion failed: no __cpp_sized_deallocation
5 | static_assert(false, "no __cpp_sized_deallocation");
  |   ^
1 error generated.

See https://gcc.godbolt.org/z/MocWxMKz6 for details.

And thus there's no this overload with clang++.
But the std::generator in libstdc++ relies on this overload, which also causes
clang++ cannot use std::generator in libstdc++ (even after clang++ 19 provided
is_pointer_interconvertible_base_of discussed in #114891).

The following code:

#include 
#include 

std::generator iota(int n) {
for (int i = 0; i < n; ++i) {
co_yield i;
}
}

int main() {
for (auto i : iota(10)) {
}
return 0;
}

compiled with: clang++ -std=c++23 -stdlib=libstdc++
And the compilation errors:

In file included from main.cpp:16:
/usr/bin/../lib/gcc/x86_64-linux-gnu/14/../../../../include/c++/14/generator:606:6:
error: no matching function for call to 'operator delete'
  606 | ::operator delete(__ptr, _M_alloc_size(__sz));
  | ^


See https://gcc.godbolt.org/z/xjMGaq36a for details.

Note that there's no restrictions that std::generator must depends on this
overload of operator delete in ISO C++. This may cause clang++ or other
compilers cannot use std::generator in libstdc++.

  1   2   3   4   >