[Bug target/114323] [14 Regression] MVE vector load intrinsic miscompiled since r14-5622-g4d7647edfd7d98

2024-03-14 Thread prathamesh3492 at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114323

prathamesh3492 at gcc dot gnu.org changed:

   What|Removed |Added

 CC||prathamesh3492 at gcc dot 
gnu.org

--- Comment #3 from prathamesh3492 at gcc dot gnu.org ---
Just to expand on previous comments:
Before patch, input to dse is:

  uint32x4_t D.13560;
  const uint32_t D.13545[4];
  uint32x4_t V0;
  __simd128_uint32_t _7;

   :
  # .MEM_2 = VDEF <.MEM_1(D)>
  D.13545 = *.LC0;
  # .MEM_8 = VDEF <.MEM_2>
  _7 = __builtin_mve_vld1q_uv4si ();
  # .MEM_6 = VDEF <.MEM_8>
  D.13545 ={v} {CLOBBER(eos)};
  # VUSE <.MEM_6>
  return _7;

In this case, we have following virtual def-use chain:
.MEM_1(D) -> .MEM_2 -> .MEM_8 -> .MEM_6


However after patch, input to dse is:
  const uint32_t D.13539[4];
  uint32x4_t V0;

   :
  # .MEM_2 = VDEF <.MEM_1(D)>
  D.13539 = *.LC0;
  V0_3 = vld1q_u32 ();
  # .MEM_5 = VDEF <.MEM_2>
  D.13539 ={v} {CLOBBER(eos)};
  # VUSE <.MEM_5>
  return V0_3;

There's a missing use of MEM_2 in call to vld1q_u32, and
since the only use of MEM_2 now is in clobber statement,
dse considers it as a dead store, and simplifies it to:

   :
  V0_3 = vld1q_u32 ();
  # .MEM_5 = VDEF <.MEM_1(D)>
  D.13539 ={v} {CLOBBER(eos)};
  # VUSE <.MEM_5>
  return V0_3;

thus passing uninitialized pointer to vld1q_u32.

Thanks,
Prathamesh

Results for 13.2.1 20240315 [releases/gcc-13 r13-8439-g7d2d6e1ab5] (GCC) testsuite on powerpc64le-unknown-linux-gnu

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


git commit g:7d2d6e1ab566f8fa5e87028b7ab9da8d5d0a1369
gcc-descr r13-8439-g7d2d6e1ab566f8

power9
Linux 5.15.0-97-generic ppc64le
GNU Make 4.3

DejaGnu:
DejaGnu version 1.6.2
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Fri Mar 15 04:27:49 UTC 2024 (revision r13-8439-g7d2d6e1ab5)

Native configuration is powerpc64le-unknown-linux-gnu

=== gcc tests ===


Running target unix
ERROR: tcl error sourcing 
/home/gccbuild/gcc_13_git/gcc/gcc/testsuite/gcc.dg/analyzer/analyzer.exp.
ERROR: unmatched open brace in list
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 24)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 34)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 56)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 66)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 73)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 77)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 82)
FAIL: gcc.dg/cpp/include2.c  (test for errors, line 10)
FAIL: gcc.dg/cpp/include2.c (test for excess errors)
FAIL: gcc.dg/cpp/line2.c line # too low at line 12 (test for errors, line 1)
FAIL: gcc.dg/cpp/line2.c line # too high at line 13 (test for errors, line 2)
FAIL: gcc.dg/cpp/mac-dir-2.c  (test for errors, line 12)
FAIL: gcc.dg/cpp/skipping2.c tokens after #endif (test for errors, line 13)
FAIL: gcc.dg/cpp/skipping2.c (test for excess errors)
FAIL: gcc.dg/2111-1.c (test for excess errors)
XPASS: gcc.dg/Wtrampolines.c standard descriptors (test for warnings, line 29)
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   -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/pr54200.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -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   -O1  -DPREVENT_OPTIMIZATION  line 20 x == 36
FAIL: gcc.dg/guality/pr54519-3.c   -O1  -DPREVENT_OPTIMIZATION  line 20 z == 6
FAIL: gcc.dg/guality/pr54519-3.c   -O1  -DPREVENT_OPTIMIZATION  line 23 x == 98
FAIL: gcc.dg/guality/pr54519-3.c   -O1  -DPREVENT_OPTIMIZATION  line 23 z == 8
FAIL: gcc.dg/guality/pr54519-3.c   -O2  -DPREVENT_OPTIMIZATION  line 20 z == 6
FAIL: gcc.dg/guality/pr54519-3.c   -O2  -DPREVENT_OPTIMIZATION  line 23 z == 8
FAIL: gcc.dg/guality/pr54519-3.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 20 z == 
6
FAIL: gcc.dg/guality/pr54519-3.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 23 z == 
8
FAIL: gcc.dg/guality/pr54519-3.c   -Os  -DPREVENT_OPTIMIZATION  line 20 z == 6
FAIL: gcc.dg/guality/pr54519-3.c   -Os  -DPREVENT_OPTIMIZATION  line 23 z == 8
FAIL: gcc.dg/guality/pr54519-3.c  -Og -DPREVENT_OPTIMIZATION  line 20 x == 36
FAIL: gcc.dg/guality/pr54519-3.c  -Og -DPREVENT_OPTIMIZATION  line 20 z == 6
FAIL: gcc.dg/guality/pr54519-3.c  -Og -DPREVENT_OPTIMIZATION  line 23 x == 98
FAIL: gcc.dg/guality/pr54519-3.c  -Og -DPREVENT_OPTIMIZATION  line 23 z == 8
FAIL: gcc.dg/guality/pr54519-3.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 y == 25
FAIL: gcc.dg/guality/pr54519-3.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 20 z == 6
FAIL: gcc.dg/guality/pr54519-3.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 23 y == 117
FAIL: gcc.dg/guality/pr54519-3.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 23 z == 8
FAIL: gcc.dg/guality/pr54519-3.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  

Re: C/C++ frontend patches ping

2024-03-14 Thread Andi Kleen
Andrew Pinski  writes:

> On Thu, Mar 14, 2024 at 9:36 PM Andi Kleen  wrote:
>>
>>
>> musttail support for C/C++
>>
>> https://gcc.gnu.org/pipermail/gcc-patches/2024-January/643867.html
>>
>>
>> Support constexpr for asm statements in C++
>>
>> https://gcc.gnu.org/pipermail/gcc-patches/2024-January/643933.html
>
>
> Both of these were posted long after the start of stage 3 and close
> into the beginning of stage 4 and since they are both new features I
> really doubt they will be reviewed until stage 1 opens up which will
> be in about a month or so.

I don't buy it.

This mailing list and the git logs are full of approved feature patches
that are clearly not bug fixes.  If there is really such a rule it is
extremely selectively and unfairly enforced.

-Andi


[Bug middle-end/114347] wrong constant folding when casting __bf16 to int

2024-03-14 Thread eggert at cs dot ucla.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114347

--- Comment #2 from Paul Eggert  ---
(In reply to Andrew Pinski from comment #1)
> I am not so sure that 257.0bf16 gets rounded to 256.

It should get rounded to 256, since 257 has no exact representation in __bf16
and 256 is the closest representable value.

And GCC does this correctly in my experiments. If I compile this:

  __bf16 w = 256.0bf16;
  __bf16 x = 257.0bf16;

with "gcc -O2 -S", the assembly code says ".value 17280" for both constants.

Results for 14.0.1 20240315 (experimental) [remotes/origin/HEAD r14-9486-gd7d05824ae] (GCC) testsuite on powerpc64le-unknown-linux-gnu

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


git commit g:d7d05824ae68da24908d97a10b9ec59d08f75a90
gcc-descr r14-9486-gd7d05824ae68da

power8
Linux 5.4.0-172-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: Fri Mar 15 02:48:14 UTC 2024 (revision r14-9486-gd7d05824ae)

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  -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/pr43051-1.c   -O1  -DPREVENT_OPTIMIZATION  line 34 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O1  -DPREVENT_OPTIMIZATION  line 39 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2  -DPREVENT_OPTIMIZATION  line 34 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2  -DPREVENT_OPTIMIZATION  line 39 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 34 c == [0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 39 c == [0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 34 c == [0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 39 c == [0]
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  

[Bug middle-end/114347] wrong constant folding when casting __bf16 to int

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

--- Comment #1 from Andrew Pinski  ---
Hmm, I am not so sure that 257.0bf16 gets rounded to 256.

Results for 14.0.1 20240314 (experimental) [master r14-9481-g6cf4286ff94] (GCC) testsuite on s390x-ibm-linux-gnu arch14

2024-03-14 Thread stefansf--- via Gcc-testresults
LAST_UPDATED: Thu Mar 14 18:05:20 UTC 2024 (revision r14-9481-g6cf4286ff94)

=== 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: gcc.dg/analyzer/pr94688.c (test for excess errors)
FAIL: gcc.dg/analyzer/pr95152-5.c (test for excess errors)
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 

[Bug c/114347] New: wrong constant folding when casting __bf16 to int

2024-03-14 Thread eggert at cs dot ucla.edu via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114347

Bug ID: 114347
   Summary: wrong constant folding when casting __bf16 to int
   Product: gcc
   Version: 13.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: eggert at cs dot ucla.edu
  Target Milestone: ---

This is gcc (GCC) 13.2.1 20231205 (Red Hat 13.2.1-6) on Fedora 39. I found this
bug when looking into a GNU coreutils report 
originally reported against Clang (Clang has a different bug).

Compile and run this program:

  __bf16 x = 257.0bf16;
  int
  main (void)
  {
return (int) x != (int) 257.0bf16;
  }

with "gcc -O2 v.c; ./a.out; echo $?". This prints "1"; it should print "0".

The problem is that GCC constant-folds '(int) 257.0bf16' to 257. This is
incorrect, as 257.0bf16 is exactly equal to 256.0bf16, due to rounding when the
constant is parsed. The expression '(int) x' correctly yields 256 at runtime,
and 256 is not equal to the 257 incorrectly yielded by the constant folding.

Re: C/C++ frontend patches ping

2024-03-14 Thread Andrew Pinski
On Thu, Mar 14, 2024 at 9:36 PM Andi Kleen  wrote:
>
>
> musttail support for C/C++
>
> https://gcc.gnu.org/pipermail/gcc-patches/2024-January/643867.html
>
>
> Support constexpr for asm statements in C++
>
> https://gcc.gnu.org/pipermail/gcc-patches/2024-January/643933.html


Both of these were posted long after the start of stage 3 and close
into the beginning of stage 4 and since they are both new features I
really doubt they will be reviewed until stage 1 opens up which will
be in about a month or so.

Thanks,
Andrew Pinski


[Bug libstdc++/81482] by-value lambda capture in remove_if

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

Andrew Pinski  changed:

   What|Removed |Added

 Resolution|--- |WONTFIX
 Status|UNCONFIRMED |RESOLVED

--- Comment #5 from Andrew Pinski  ---
Won't fix as this is the correct behavior and all.

C/C++ frontend patches ping

2024-03-14 Thread Andi Kleen


musttail support for C/C++

https://gcc.gnu.org/pipermail/gcc-patches/2024-January/643867.html


Support constexpr for asm statements in C++

https://gcc.gnu.org/pipermail/gcc-patches/2024-January/643933.html


[Bug target/81759] Improve data tracking for _pext_u64

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

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2017-08-08 00:00:00 |2024-3-14

--- Comment #4 from Andrew Pinski  ---
_pext_u64 is still opaque idea to gimple.

[Bug target/81759] Improve data tracking for _pext_u64 and __builtin_ffsll

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

--- Comment #3 from Andrew Pinski  ---
(In reply to Daniel Fruzynski from comment #2)
> Looks that __builtin_ffs does not check if input value is nonzero at all.
> Assembler code for following code also has unnecessary instructions:
> 
> [code]
> unsigned int test(unsigned int n)
> {
>   if (n == 0)
> __builtin_unreachable();
>   return __builtin_ffs(n) - 1;
> }
> [/code]

The above is now handled since GCC 11.

Results for 14.0.1 20240315 (experimental) [remotes/origin/HEAD r14-9486-gd7d05824ae6] (GCC) testsuite on powerpc64le-unknown-linux-gnu

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


git commit g:d7d05824ae68da24908d97a10b9ec59d08f75a90
gcc-descr r14-9486-gd7d05824ae68da

power9
Linux 5.15.0-97-generic ppc64le
GNU Make 4.3

DejaGnu:
DejaGnu version 1.6.2
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Fri Mar 15 02:58:21 UTC 2024 (revision r14-9486-gd7d05824ae6)

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  -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/pr43051-1.c   -O1  -DPREVENT_OPTIMIZATION  line 34 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O1  -DPREVENT_OPTIMIZATION  line 39 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2  -DPREVENT_OPTIMIZATION  line 34 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2  -DPREVENT_OPTIMIZATION  line 39 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 34 c == [0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 39 c == [0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 34 c == [0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 39 c == [0]
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  

[Bug tree-optimization/114346] New: vectorizer generates the same IV twice

2024-03-14 Thread tnfchris at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114346

Bug ID: 114346
   Summary: vectorizer generates the same IV twice
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tnfchris at gcc dot gnu.org
  Target Milestone: ---

The following example:

---
double f(int n, double *data, double b) {
double res = b;

for (int i=0;i
  _48 = vect_vec_iv_.7_45 + { POLY_INT_CST [2, 2], ... };
  _71 = VIEW_CONVERT_EXPR(vect_vec_iv_.7_45);
  _72 = VIEW_CONVERT_EXPR({ POLY_INT_CST [4, 4],
... });
  _73 = _71 + _72;
  _49 = VIEW_CONVERT_EXPR(_73);

so it looks like _48 and _49 are the same value, except that _48 is done as
32-bit IV and _49 is calculated as a 64-bit one and truncated to 32?

[Bug tree-optimization/114345] FRE missing knowledge of semantics of IFN loads

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

Andrew Pinski  changed:

   What|Removed |Added

   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=106365

--- Comment #2 from Andrew Pinski  ---
Oh VN does have some knowledge of MASK_STORE and LEN_STORE. Just not LOAD_LANES
.


See PR 106365 for MASK_STORE and LEN_STORE implementation. Shouldn't be hard to
add LOAD_LANES/STORE_LANES there ...

[Bug tree-optimization/114345] FRE missing knowledge of semantics of IFN loads

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

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Last reconfirmed||2024-03-15
 CC||pinskia at gcc dot gnu.org
 Status|UNCONFIRMED |NEW
   Severity|normal  |enhancement

--- Comment #1 from Andrew Pinski  ---
Confirmed.  I thought there was already a bug recording this but I can't find
it.

[Bug c++/83777] Invalid dependent initialization of a static data member.

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

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2018-01-11 00:00:00 |2024-3-14
 Status|WAITING |NEW
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=86565

--- Comment #3 from Andrew Pinski  ---
I am not 100% sure if rejecting this is required if C:BlockSize is not
used.

Results for 13.2.1 20240315 [releases/gcc-13 r13-8439-g7d2d6e1ab5] (GCC) testsuite on powerpc64le-unknown-linux-gnu

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


git commit g:7d2d6e1ab566f8fa5e87028b7ab9da8d5d0a1369
gcc-descr r13-8439-g7d2d6e1ab566f8

power9 IEEE128
Linux 6.8.0-0.rc6.20240229git805d849d7c3c.51.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: Fri Mar 15 02:59:11 UTC 2024 (revision r13-8439-g7d2d6e1ab5)

Native configuration is powerpc64le-unknown-linux-gnu

=== gcc tests ===


Running target unix
FAIL: gcc.dg/analyzer/data-model-4.c (test for excess errors)
ERROR: tcl error code NONE
ERROR: tcl error sourcing 
/home/gccbuild/gcc_13_git/gcc/gcc/testsuite/gcc.dg/analyzer/analyzer.exp.
UNRESOLVED: testcase 
'/home/gccbuild/gcc_13_git/gcc/gcc/testsuite/gcc.dg/analyzer/analyzer.exp' 
aborted due to Tcl error
ERROR: unmatched open brace in list
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)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 24)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 34)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 56)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 66)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 73)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 77)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 82)
FAIL: gcc.dg/cpp/include2.c  (test for errors, line 10)
FAIL: gcc.dg/cpp/include2.c (test for excess errors)
FAIL: gcc.dg/cpp/include2a.c  (test for errors, line 10)
FAIL: gcc.dg/cpp/include2a.c (test for excess errors)
FAIL: gcc.dg/cpp/include2a.c missing at line 15 (test for errors, line )
FAIL: gcc.dg/cpp/line2.c line # too high at line 13 (test for errors, line 2)
FAIL: gcc.dg/cpp/line2.c line # too low at line 12 (test for errors, line 1)
FAIL: gcc.dg/cpp/mac-dir-2.c  (test for errors, line 12)
FAIL: gcc.dg/cpp/multiline-2.c (test for excess errors)
FAIL: gcc.dg/cpp/skipping2.c (test for excess errors)
FAIL: gcc.dg/cpp/skipping2.c tokens after #endif (test for errors, line 13)
XPASS: gcc.dg/Wtrampolines.c standard descriptors (test for warnings, line 29)
FAIL: gcc.dg/noreturn-6.c  (test for errors, line 4)
FAIL: gcc.dg/pr14475.c extension at line 7 (test for errors, line 6)
FAIL: gcc.dg/pr14475.c forward ref (test for errors, line 6)
FAIL: gcc.dg/pr62294.c  (test for errors, line 9)
FAIL: gcc.dg/pr62294.c (test for excess errors)
FAIL: gcc.dg/pr93054.c (test for excess errors)
FAIL: gcc.dg/tm/pr46567.c (test for excess errors)
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/tree-ssa/20030920-1.c (test for excess errors)
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
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 passes164563
# of unexpected failures44
# of unexpected successes   3
# of expected failures  1469
# of unresolved testcases   1
# of unsupported tests  2894
/home/gccbuild/build/nightly/build-gcc-13/gcc/xgcc  version 13.2.1 20240315 
[releases/gcc-13 r13-8439-g7d2d6e1ab5] (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   

[Bug tree-optimization/114345] New: FRE missing knowledge of semantics of IFN loads

2024-03-14 Thread tnfchris at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114345

Bug ID: 114345
   Summary: FRE missing knowledge of semantics of IFN loads
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: tnfchris at gcc dot gnu.org
  Target Milestone: ---

The following testcase:

---
long tdiff = 10412095;

int main() {
  struct {
long maximum;
int nonprimary_delay;
  } delays[] = {{}, {}, {}, {9223372036854775807, 36 * 60 * 60}};

  for (unsigned i = 0; i < sizeof(delays) / sizeof(delays[0]); ++i)
if (tdiff <= delays[i].maximum)
  return delays[i].nonprimary_delay;

  __builtin_abort();
}
---

compiled with -O2 -fno-vect-cost-model

generates on AArch64:

  vect_cst__45 = {tdiff.0_2, tdiff.0_2};
  vect_array.11 = .LOAD_LANES (MEM  [(long int *)]);
  vect__1.12_40 = vect_array.11[0];
  vect_array.11 ={v} {CLOBBER};
  vect_array.14 = .LOAD_LANES (MEM  [(long int *) + 32B]);
  vect__1.15_43 = vect_array.14[0];
  vect_array.14 ={v} {CLOBBER};
  mask_patt_15.17_46 = vect__1.12_40 >= vect_cst__45;
  mask_patt_15.17_47 = vect__1.15_43 >= vect_cst__45;
  vexit_reduc_51 = mask_patt_15.17_46 | mask_patt_15.17_47;

and on x86_64:

  vect_cst__53 = {tdiff.0_2, tdiff.0_2};
  _37 = { 0, 4294967295, 4294967294, 4294967293 };
  _32 = { 4, 5, 6, 7 };
  vect__1.11_42 = MEM  [(long int *)];
  vectp_delays.9_43 =  + 16;
  vect__1.12_44 = MEM  [(long int *)vectp_delays.9_43];
  vect_perm_even_45 = VEC_PERM_EXPR ;
  vectp_delays.9_47 =  + 32;
  vect__1.13_48 = MEM  [(long int *)vectp_delays.9_47];
  vectp_delays.9_49 =  + 48;
  vect__1.14_50 = MEM  [(long int *)vectp_delays.9_49];
  vect_perm_even_51 = VEC_PERM_EXPR ;
  mask_patt_17.15_54 = vect_perm_even_45 >= vect_cst__53;
  mask_patt_17.15_55 = vect_perm_even_51 >= vect_cst__53;
  vexit_reduc_59 = mask_patt_17.15_54 | mask_patt_17.15_55;

which is eventually simplified by FRE into:

  vect_cst__53 = {tdiff.0_2, tdiff.0_2};
  mask_patt_17.15_54 = vect_cst__53 <= { 0, 0 };
  mask_patt_17.15_55 = vect_cst__53 <= { 0, 9223372036854775807 };
  vexit_reduc_59 = mask_patt_17.15_54 | mask_patt_17.15_55;

and realizing that the loads aren't needed.

It looks like the reason is that FRE doesn't understand LOAD_LANES and
MASKED_LOAD_LANES or the other load IFNs.

We thus end up with a spill to the stack and a load of the constants.

[Bug other/70268] add option -ffile-prefix-map to map one directory name (old) to another (new) in __FILE__, __BASE_FILE__and __builtin_FILE()

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

Andrew Pinski  changed:

   What|Removed |Added

 CC||joerg at netbsd dot org

--- Comment #19 from Andrew Pinski  ---
*** Bug 47047 has been marked as a duplicate of this bug. ***

[Bug preprocessor/47047] Support for path translation in __FILE__

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

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #8 from Andrew Pinski  ---
Yes this is a dup.

*** This bug has been marked as a duplicate of bug 70268 ***

[Bug tree-optimization/88823] ivopts introduces -1(OVF)

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

--- Comment #2 from Andrew Pinski  ---
Looks to be fixed on the trunk.

Re: [PATCH] vect: Use xor to invert oversized vector masks

2024-03-14 Thread Hongtao Liu
On Thu, Mar 14, 2024 at 11:42 PM Andrew Stubbs  wrote:
>
> Don't enable excess lanes when inverting vector bit-masks smaller than the
> integer mode.  This is yet another case of wrong-code due to mishandling
> of oversized bitmasks.
>
> This issue shows up in vect/tsvc/vect-tsvc-s278.c and
> vect/tsvc/vect-tsvc-s279.c if I set the preferred vector size to V32
> (down from V64) on amdgcn.
>
> OK for mainline?
>
> Andrew
>
> gcc/ChangeLog:
>
> * expr.cc (expand_expr_real_2): Use xor to invert vector masks.
> ---
>  gcc/expr.cc | 11 +++
>  1 file changed, 11 insertions(+)
>
> diff --git a/gcc/expr.cc b/gcc/expr.cc
> index 403eeaa108e4..3540327d879e 100644
> --- a/gcc/expr.cc
> +++ b/gcc/expr.cc
> @@ -10497,6 +10497,17 @@ expand_expr_real_2 (sepops ops, rtx target, 
> machine_mode tmode,
>immed_wide_int_const (mask, int_mode),
>target, 1, OPTAB_LIB_WIDEN);
> }
> +  /* If it's a vector mask don't enable excess bits.  */
> +  else if (VECTOR_BOOLEAN_TYPE_P (type)
> +  && SCALAR_INT_MODE_P (mode)
> +  && maybe_ne (GET_MODE_PRECISION (mode),
> +   TYPE_VECTOR_SUBPARTS (type).to_constant ()))
> +   {
> + auto nunits = TYPE_VECTOR_SUBPARTS (type).to_constant ();
> + temp = expand_binop (mode, xor_optab, op0,
> +  GEN_INT ((HOST_WIDE_INT_1U << nunits) - 1),
> +  target, true, OPTAB_WIDEN);
> +   }
Not review, just curious, should the issue be fixed by the commit in PR113576.
Also wonder besides cbranch, excess land bits also matter?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113576#c35
>else
> temp = expand_unop (mode, one_cmpl_optab, op0, target, 1);
>gcc_assert (temp);
> --
> 2.41.0
>


-- 
BR,
Hongtao


[Bug tree-optimization/88926] ivopts with some NOP conversions

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

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed|2019-01-21 00:00:00 |2024-3-14

--- Comment #3 from Andrew Pinski  ---
Note you need to do `s/*p = 0;/*p = 1;/` otherwise you end up with just memset.

[Bug ipa/89567] [missed-optimization] Should not be initializing unused struct parameter members

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

Andrew Pinski  changed:

   What|Removed |Added

   Severity|normal  |enhancement

--- Comment #6 from Andrew Pinski  ---
IPA-SRA does handle this if the function is static.

Also mod-ref handles this if the function takes a pointer instead of a struct.
Aka:
```
 struct two_ints { int x, y; };

  __attribute__((noinline)) int foo2(struct two_ints *s)
  {
return s->x;
  }

  int bar2(int* a)
  {
struct two_ints ti = { a[5], a[10] };
int b = foo2();
return b * b;
  }
```

The store to ti.x is only there now.

I am think this can be closed as fixed ...

Regressions on master at commit r14-9469 vs commit r14-9458 on Linux/x86_64

2024-03-14 Thread H.J. Lu via Gcc-regression
Regressions on master at commit r14-9469 vs commit r14-9458 on Linux/x86_64
New failures:
FAIL: gcc.dg/torture/convert-dfp.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)

New passes:


Results for 14.0.1 20240314 (experimental) [master r14-9469-g9349aefa1df] (GCC) testsuite on x86_64-pc-linux-gnu

2024-03-14 Thread H.J. Lu via Gcc-testresults
e 28 i + 1 == 8
FAIL: gcc.dg/guality/pr90074.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 28 c + 1 == 2
FAIL: gcc.dg/guality/pr90074.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 28 i + 1 == 8
FAIL: gcc.dg/guality/pr90716.c   -O1  -DPREVENT_OPTIMIZATION  line 23 j + 1 == 9
FAIL: gcc.dg/guality/pr90716.c   -O2  -DPREVENT_OPTIMIZATION  line 23 j + 1 == 9
FAIL: gcc.dg/guality/pr90716.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 23 j + 1 == 9
FAIL: gcc.dg/guality/pr90716.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 23 j + 1 == 9
FAIL: gcc.dg/guality/pr90716.c   -Os  -DPREVENT_OPTIMIZATION  line 23 j + 1 == 9
FAIL: gcc.dg/guality/sra-1.c   -O2  -DPREVENT_OPTIMIZATION  line 43 a.j == 14
FAIL: gcc.dg/guality/sra-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 43 a.j == 14
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   -O3 -g  -DPREVENT_OPTIMIZATION  line 43 a.j == 14
FAIL: gcc.dg/guality/sra-1.c   -Os  -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 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 17 sizeof (a) == 6
XPASS: gcc.dg/tree-ssa/builtin-snprintf-6.c scan-tree-dump-times optimized 
"Function test_assign_aggregate" 1
FAIL: gcc.dg/tree-ssa/dump-6.c scan-tree-dump store-merging "MEM  
[(char *)] = "
FAIL: gcc.target/i386/bmi2-pr112526.c (test for excess errors)
FAIL: gcc.target/i386/bmi2-pr112526.c execution test
FAIL: gcc.target/i386/invariant-ternlog-1.c scan-assembler-times 
vpternlog[^nr]*(%rdx) 2
FAIL: gcc.target/i386/pr105854.c (test for excess errors)
FAIL: gcc.target/i386/pr112943.c (test for excess errors)
FAIL: gcc.target/i386/pr53533-1.c scan-assembler-times (?:addl|subl)[ \\t] 1
FAIL: gcc.target/i386/pr53533-3.c scan-assembler-times (?:addl|subl)[ \\t] 1
FAIL: gcc.target/i386/pr55583.c scan-assembler-times (?n)shld[ql]?[t 
]*\$2 2
FAIL: gcc.target/i386/pr55583.c scan-assembler-times (?n)shrd[ql]?[t 
]*\$2 4
FAIL: gcc.target/i386/pr89618-2.c scan-tree-dump vect "loop vectorized using 16 
byte vectors"
FAIL: gcc.target/i386/pr96539.c scan-assembler-not rep[^\\n\\r]*movs
FAIL: gcc.target/i386/pr97971.c  (test for errors, line 10)
FAIL: gcc.target/i386/shrink_wrap_1.c scan-rtl-dump pro_and_epilogue 
"Performing shrink-wrapping"

=== gcc Summary for unix/-mx32 ===

# of expected passes200277
# of unexpected failures151
# of unexpected successes   16
# of expected failures  1550
# of unsupported tests  3407

=== gcc Summary ===

# of expected passes600889
# of unexpected failures399
# of unexpected successes   59
# of expected failures  4657
# of unresolved testcases   1
# of unsupported tests  10728
/export/gnu/import/git/gcc-test-master-intel64/bld/gcc/xgcc  version 14.0.1 
20240314 (experimental) [master r14-9469-g9349aefa1df] (GCC) 

=== gfortran tests ===


Running target unix

=== gfortran Summary for unix ===

# of expected passes69711
# of expected failures  273
# of unsupported tests  65

Running target unix/-m32

=== gfortran Summary for unix/-m32 ===

# of expected passes69377
# of expected failures  275
# of unsupported tests  223

Running target unix/-mx32

=== gfortran Summary for unix/-mx32 ===

# of expected passes69724
# of expected failures  275
# of unsupported tests  54

=== gfortran Summary ===

#

[Bug rtl-optimization/43473] hword size destination variable induces suboptimal code generation compared to full word size var

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

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||missed-optimization

--- Comment #3 from Andrew Pinski  ---
The difference is.
for ma:
```
(insn 11 10 13 2 (set (reg:SI 122)
(ior:SI (subreg:SI (reg:HI 119 [ a ]) 0)
(const_int -16384 [0xc000]))) "/app/example.cpp":9:11
110 {*iorsi3_insn}
 (expr_list:REG_DEAD (reg:HI 119 [ a ])
(nil)))
```

vs for mb:
```
(insn 9 8 10 2 (set (reg:SI 121 [ _3 ])
(ior:SI (reg:SI 120 [ b ])
(const_int 49152 [0xc000]))) "/app/example.cpp":16:22 110
{*iorsi3_insn}
 (expr_list:REG_DEAD (reg:SI 120 [ b ])
(nil)))
```

[Bug rtl-optimization/29860] comment / code incosistency in cfgcleanup.c:flow_find_cross_jump

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

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
r0-127486-ga0cbe71e87398b changed the code slightly .

It was originally added with r0-39385-g08f7f057cc4762 and then moved slightly
by r0-39553-gd1ee6d9bb7d372.

I don't know if Honza would remember any of this code though since it was done
over 20 years ago.

Results for 14.0.1 20240315 (experimental) [remotes/origin/HEAD r14-9486-gd7d05824ae] (GCC) testsuite on powerpc64le-unknown-linux-gnu

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


git commit g:d7d05824ae68da24908d97a10b9ec59d08f75a90
gcc-descr r14-9486-gd7d05824ae68da

power9 IEEE128
Linux 6.8.0-0.rc6.20240229git805d849d7c3c.51.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: Fri Mar 15 01:27:40 UTC 2024 (revision r14-9486-gd7d05824ae)

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  -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/pr43051-1.c   -O1  -DPREVENT_OPTIMIZATION  line 34 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O1  -DPREVENT_OPTIMIZATION  line 39 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2  -DPREVENT_OPTIMIZATION  line 34 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2  -DPREVENT_OPTIMIZATION  line 39 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 34 c == [0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 39 c == [0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 34 c == [0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 39 c == [0]
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 

Results for 14.0.1 20240314 (experimental) [master r14-9483-g6dbf0d252f6] (GCC) testsuite on i686-pc-linux-gnu

2024-03-14 Thread H.J. Lu via Gcc-testresults
xecution 
test
XPASS: gcc.dg/vect/vect-reduc-in-order-4.c execution test
FAIL: gcc.dg/vect/vect-simd-clone-16e.c scan-tree-dump-times vect "[nr] 
[^n]* = foo.simdclone" 4
FAIL: gcc.dg/vect/vect-simd-clone-16f.c scan-tree-dump-times vect "[nr] 
[^n]* = foo.simdclone" 2
FAIL: gcc.dg/vect/vect-simd-clone-17e.c scan-tree-dump-times vect "[nr] 
[^n]* = foo.simdclone" 4
FAIL: gcc.dg/vect/vect-simd-clone-17f.c scan-tree-dump-times vect "[nr] 
[^n]* = foo.simdclone" 2
FAIL: gcc.dg/vect/vect-simd-clone-18e.c scan-tree-dump-times vect "[nr] 
[^n]* = foo.simdclone" 4
FAIL: gcc.dg/vect/vect-simd-clone-18f.c scan-tree-dump-times vect "[nr] 
[^n]* = foo.simdclone" 2

=== gcc Summary ===

# of expected passes196970
# of unexpected failures125
# of unexpected successes   27
# of expected failures  1556
# of unsupported tests  4078
/export/gnu/import/git/gcc-test-master-ia32/bld/gcc/xgcc  version 14.0.1 
20240314 (experimental) [master r14-9483-g6dbf0d252f6] (GCC) 

=== gfortran tests ===


Running target unix

=== gfortran Summary ===

# of expected passes69373
# of expected failures  275
# of unsupported tests  224
/export/gnu/import/git/gcc-test-master-ia32/bld/gcc/gfortran  version 14.0.1 
20240314 (experimental) [master r14-9483-g6dbf0d252f6] (GCC) 

=== g++ tests ===


Running target unix
FAIL: g++.dg/guality/pr55665.C   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  line 23 p == 40
FAIL: g++.dg/torture/pr104601.C   -O0  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O1  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O3 -g  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -Os  (test for excess errors)

=== g++ Summary ===

# of expected passes260017
# of unexpected failures8
# of expected failures  2753
# of unsupported tests  10971
/export/gnu/import/git/gcc-test-master-ia32/bld/gcc/xg++  version 14.0.1 
20240314 (experimental) [master r14-9483-g6dbf0d252f6] (GCC) 

=== objc tests ===


Running target unix

=== objc Summary ===

# of expected passes2840
# of expected failures  6
# of unsupported tests      70
/export/gnu/import/git/gcc-test-master-ia32/bld/gcc/xgcc  version 14.0.1 
20240314 (experimental) [master r14-9483-g6dbf0d252f6] (GCC) 

=== libatomic tests ===


Running target unix

=== libatomic Summary ===

# of expected passes44
# of unsupported tests  5
=== libgomp tests ===


Running target unix

=== libgomp Summary ===

# of expected passes16301
# of expected failures  285
# of unsupported tests  635
=== libitm tests ===


Running target unix

=== libitm Summary ===

# of expected passes44
# of expected failures  3
# of unsupported tests  1
=== libstdc++ tests ===


Running target unix

=== libstdc++ Summary ===

# of expected passes19280
# of expected failures  126
# of unsupported tests  374

Compiler version: 14.0.1 20240314 (experimental) [master r14-9483-g6dbf0d252f6] 
(GCC) 
Platform: i686-pc-linux-gnu
configure flags: --enable-clocale=gnu --with-system-zlib --enable-shared 
--enable-cet --with-demangler-in-ld --enable-libmpx --prefix=/usr/gcc-14.0.1 
i686-linux --with-fpmath=sse


Regressions on master at commit r14-9483 vs commit r14-9469 on Linux/i686

2024-03-14 Thread H.J. Lu via Gcc-regression
Regressions on master at commit r14-9483 vs commit r14-9469 on Linux/i686
New failures:
FAIL: g++.dg/torture/pr104601.C   -O0  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O1  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O3 -g  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -Os  (test for excess errors)

New passes:


Results for 11.4.1 20240315 [releases/gcc-11 revision 5cc46561670:7ce5f15d07e:f51018ba255198aa342c2c7bb5e826e9a671f0a1] (GCC) testsuite on powerpc64le-unknown-linux-gnu

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


git commit g:f51018ba255198aa342c2c7bb5e826e9a671f0a1
gcc-descr r11-11280-gf51018ba255198

power9
Linux 5.15.0-97-generic ppc64le
GNU Make 4.3

DejaGnu:
DejaGnu version 1.6.2
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Fri Mar 15 01:51:34 UTC 2024 (revision 
5cc46561670:7ce5f15d07e:f51018ba255198aa342c2c7bb5e826e9a671f0a1)

Native configuration is powerpc64le-unknown-linux-gnu

=== gcc tests ===


Running target unix
FAIL: gcc.dg/analyzer/analyzer-verbosity-2a.c (test for excess errors)
FAIL: gcc.dg/analyzer/analyzer-verbosity-3a.c (test for excess errors)
FAIL: gcc.dg/analyzer/edges-1.c (test for excess errors)
FAIL: gcc.dg/analyzer/file-1.c (test for excess errors)
FAIL: gcc.dg/analyzer/file-2.c (test for excess errors)
FAIL: gcc.dg/analyzer/file-paths-1.c (test for excess errors)
FAIL: gcc.dg/analyzer/file-pr58237.c (test for excess errors)
FAIL: gcc.dg/analyzer/pr99716-1.c (test for excess errors)
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"
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   -O3 -g  execution test
FAIL: gcc.dg/torture/float128-cmp-invalid.c   -Os  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/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/tree-ssa/ssa-dom-cse-2.c scan-tree-dump optimized "return 28;"
UNRESOLVED: gcc.dg/vect/pr108950.c scan-tree-dump-not vect "widen_sum"
UNRESOLVED: gcc.dg/vect/pr108950.c -flto -ffat-lto-objects  scan-tree-dump-not 
vect "widen_sum"
FAIL: gcc.target/powerpc/pr56605.c scan-rtl-dump-times combine "(compare:CC 
((?:and|zero_extend):(?:DI) ((?: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: gcc.target/powerpc/ppc-fortran/ieee128-math.f90   -O  (test for excess 
errors)

=== gcc Summary ===

# of expected passes147356
# of unexpected failures38
# of unexpected successes   4
# of expected failures  916
# of unresolved testcases   2
# of unsupported tests  2763
/home/gccbuild/build/nightly/build-gcc-11/gcc/xgcc  version 11.4.1 20240315 
[releases/gcc-11 revision 
5cc46561670:7ce5f15d07e:f51018ba255198aa342c2c7bb5e826e9a671f0a1] (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.f90   -O2  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -O3 -fomit-frame-pointer 

Results for 11.4.1 20240315 [releases/gcc-11 revision 5cc4656167:7ce5f15d07:f51018ba255198aa342c2c7bb5e826e9a671f0a1] (GCC) testsuite on powerpc64le-unknown-linux-gnu

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


git commit g:f51018ba255198aa342c2c7bb5e826e9a671f0a1
gcc-descr r11-11280-gf51018ba255198

power8
Linux 5.4.0-172-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: Fri Mar 15 01:21:36 UTC 2024 (revision 
5cc4656167:7ce5f15d07:f51018ba255198aa342c2c7bb5e826e9a671f0a1)

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: 

[Bug target/111555] [AArch64] __ARM_FEATURE_UNALIGNED should be undefined with -mstrict-align

2024-03-14 Thread i at maskray dot me via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111555

Fangrui Song  changed:

   What|Removed |Added

 CC||i at maskray dot me

--- Comment #5 from Fangrui Song  ---
It seems that newer ports prefer -mstrict-align/-mno-strict-align to
-mno-unaligned-access/-munaligned-access.
Clang handling these options as aliases is unfortunate. I'll fix this issue in 
https://github.com/llvm/llvm-project/pull/85350 (hopefully milestone: 19.1.0)

[r14-9478 Regression] FAIL: g++.dg/torture/pr104601.C -Os (test for excess errors) on Linux/x86_64

2024-03-14 Thread haochen.jiang
On Linux/x86_64,

df483ebd24689a3bebfae2089637a00eca0e5a12 is the first bad commit
commit df483ebd24689a3bebfae2089637a00eca0e5a12
Author: Jonathan Wakely 
Date:   Mon Feb 26 13:17:13 2024 +

libstdc++: Add nodiscard in 

caused

FAIL: g++.dg/torture/pr104601.C   -O0  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O1  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O3 -g  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -Os  (test for excess errors)

with GCC configured with

../../gcc/configure 
--prefix=/export/users/haochenj/src/gcc-bisect/master/master/r14-9478/usr 
--enable-clocale=gnu --with-system-zlib --with-demangler-in-ld 
--with-fpmath=sse --enable-languages=c,c++,fortran --enable-cet --without-isl 
--enable-libmpx x86_64-linux --disable-bootstrap

To reproduce:

$ cd {build_dir}/gcc && make check 
RUNTESTFLAGS="dg-torture.exp=g++.dg/torture/pr104601.C 
--target_board='unix{-m32}'"
$ cd {build_dir}/gcc && make check 
RUNTESTFLAGS="dg-torture.exp=g++.dg/torture/pr104601.C 
--target_board='unix{-m32\ -march=cascadelake}'"
$ cd {build_dir}/gcc && make check 
RUNTESTFLAGS="dg-torture.exp=g++.dg/torture/pr104601.C 
--target_board='unix{-m64}'"
$ cd {build_dir}/gcc && make check 
RUNTESTFLAGS="dg-torture.exp=g++.dg/torture/pr104601.C 
--target_board='unix{-m64\ -march=cascadelake}'"

(Please do not reply to this email, for question about this report, contact me 
at haochen dot jiang at intel.com.)
(If you met problems with cascadelake related, disabling AVX512F in command 
line might save that.)
(However, please make sure that there is no potential problems with AVX512.)


[r14-9478 Regression] FAIL: g++.dg/torture/pr104601.C -Os (test for excess errors) on Linux/x86_64

2024-03-14 Thread haochen.jiang via Gcc-regression
On Linux/x86_64,

df483ebd24689a3bebfae2089637a00eca0e5a12 is the first bad commit
commit df483ebd24689a3bebfae2089637a00eca0e5a12
Author: Jonathan Wakely 
Date:   Mon Feb 26 13:17:13 2024 +

libstdc++: Add nodiscard in 

caused

FAIL: g++.dg/torture/pr104601.C   -O0  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O1  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O3 -g  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -Os  (test for excess errors)

with GCC configured with

../../gcc/configure 
--prefix=/export/users/haochenj/src/gcc-bisect/master/master/r14-9478/usr 
--enable-clocale=gnu --with-system-zlib --with-demangler-in-ld 
--with-fpmath=sse --enable-languages=c,c++,fortran --enable-cet --without-isl 
--enable-libmpx x86_64-linux --disable-bootstrap

To reproduce:

$ cd {build_dir}/gcc && make check 
RUNTESTFLAGS="dg-torture.exp=g++.dg/torture/pr104601.C 
--target_board='unix{-m32}'"
$ cd {build_dir}/gcc && make check 
RUNTESTFLAGS="dg-torture.exp=g++.dg/torture/pr104601.C 
--target_board='unix{-m32\ -march=cascadelake}'"
$ cd {build_dir}/gcc && make check 
RUNTESTFLAGS="dg-torture.exp=g++.dg/torture/pr104601.C 
--target_board='unix{-m64}'"
$ cd {build_dir}/gcc && make check 
RUNTESTFLAGS="dg-torture.exp=g++.dg/torture/pr104601.C 
--target_board='unix{-m64\ -march=cascadelake}'"

(Please do not reply to this email, for question about this report, contact me 
at haochen dot jiang at intel.com.)
(If you met problems with cascadelake related, disabling AVX512F in command 
line might save that.)
(However, please make sure that there is no potential problems with AVX512.)


Results for 14.0.1 20240313 (experimental) [src r14-9453-g74bca21db31] (GCC) testsuite on powerpc-ibm-aix7.2.5.0

2024-03-14 Thread David Edelsohn via Gcc-testresults
LAST_UPDATED: Wed Mar 13 15:54:20 UTC 2024 (revision r14-9453-g74bca21db31)

Native configuration is powerpc-ibm-aix7.2.5.0

=== g++ tests ===


Running target unix
FAIL: g++.dg/compat/eh/new1 cp_compat_x_tst.o-cp_compat_y_tst.o execute 
XPASS: g++.dg/debug/pr46583.C -gdwarf-2 -g1 (test for excess errors)
XPASS: g++.dg/debug/pr46583.C -gdwarf-2 -g1 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr46583.C -gdwarf-2 -g1 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr46583.C -gdwarf-2 (test for excess errors)
XPASS: g++.dg/debug/pr46583.C -gdwarf-2 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr46583.C -gdwarf-2 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr46583.C -gdwarf-2 -g3 (test for excess errors)
XPASS: g++.dg/debug/pr46583.C -gdwarf-2 -g3 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr46583.C -gdwarf-2 -g3 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr56294.C -gdwarf-2 -g1 (test for excess errors)
XPASS: g++.dg/debug/pr56294.C -gdwarf-2 -g1 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr56294.C -gdwarf-2 -g1 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr56294.C -gdwarf-2 (test for excess errors)
XPASS: g++.dg/debug/pr56294.C -gdwarf-2 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr56294.C -gdwarf-2 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr56294.C -gdwarf-2 -g3 (test for excess errors)
XPASS: g++.dg/debug/pr56294.C -gdwarf-2 -g3 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr56294.C -gdwarf-2 -g3 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr56819.C -gdwarf-2 -g1 (test for excess errors)
XPASS: g++.dg/debug/pr56819.C -gdwarf-2 -g1 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr56819.C -gdwarf-2 -g1 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr56819.C -gdwarf-2 (test for excess errors)
XPASS: g++.dg/debug/pr56819.C -gdwarf-2 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr56819.C -gdwarf-2 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr56819.C -gdwarf-2 -g3 (test for excess errors)
XPASS: g++.dg/debug/pr56819.C -gdwarf-2 -g3 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr56819.C -gdwarf-2 -g3 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr71432.C -gdwarf-2 -g1 (test for excess errors)
XPASS: g++.dg/debug/pr71432.C -gdwarf-2 -g1 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr71432.C -gdwarf-2 -g1 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr71432.C -gdwarf-2 (test for excess errors)
XPASS: g++.dg/debug/pr71432.C -gdwarf-2 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr71432.C -gdwarf-2 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr71432.C -gdwarf-2 -g3 (test for excess errors)
XPASS: g++.dg/debug/pr71432.C -gdwarf-2 -g3 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr71432.C -gdwarf-2 -g3 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr84704.C -gdwarf-2 -g1 (test for excess errors)
XPASS: g++.dg/debug/pr84704.C -gdwarf-2 -g1 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr84704.C -gdwarf-2 -g1 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr84704.C -gdwarf-2 (test for excess errors)
XPASS: g++.dg/debug/pr84704.C -gdwarf-2 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr84704.C -gdwarf-2 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr84704.C -gdwarf-2 -g3 (test for excess errors)
XPASS: g++.dg/debug/pr84704.C -gdwarf-2 -g3 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr84704.C -gdwarf-2 -g3 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr94272.C -gdwarf-2 -g1 (test for excess errors)
XPASS: g++.dg/debug/pr94272.C -gdwarf-2 -g1 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr94272.C -gdwarf-2 -g1 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr94272.C -gdwarf-2 (test for excess errors)
XPASS: g++.dg/debug/pr94272.C -gdwarf-2 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr94272.C -gdwarf-2 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr94272.C -gdwarf-2 -g3 (test for excess errors)
XPASS: g++.dg/debug/pr94272.C -gdwarf-2 -g3 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr94272.C -gdwarf-2 -g3 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr94281.C -gdwarf-2 -g1 (test for excess errors)
XPASS: g++.dg/debug/pr94281.C -gdwarf-2 -g1 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr94281.C -gdwarf-2 -g1 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr94281.C -gdwarf-2 (test for excess errors)
XPASS: g++.dg/debug/pr94281.C -gdwarf-2 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr94281.C -gdwarf-2 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr94281.C -gdwarf-2 -g3 (test for excess errors)
XPASS: g++.dg/debug/pr94281.C -gdwarf-2 -g3 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr94281.C -gdwarf-2 -g3 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr94323.C -gdwarf-2 -g1 (test for excess errors)
XPASS: g++.dg/debug/pr94323.C -gdwarf-2 -g1 -O2 (test for excess errors)
XPASS: g++.dg/debug/pr94323.C -gdwarf-2 -g1 -O3 (test for excess errors)
XPASS: g++.dg/debug/pr94323.C -gdwarf-2 (test for excess errors)
XPASS: g++.dg/debug/pr94323.C 

Re: [PATCH v1] libstdc++: Optimize removal from unique assoc containers [PR112934]

2024-03-14 Thread Barnabás Pőcze
Hi


2024. március 13., szerda 12:43 keltezéssel, Jonathan Wakely 
 írta:

> On Mon, 11 Mar 2024 at 23:36, Barnabás Pőcze  wrote:
> >
> > Previously, calling erase(key) on both std::map and std::set
> > would execute that same code that std::multi{map,set} would.
> > However, doing that is unnecessary because std::{map,set}
> > guarantee that all elements are unique.
> >
> > It is reasonable to expect that erase(key) is equivalent
> > or better than:
> >
> >   auto it = m.find(key);
> >   if (it != m.end())
> > m.erase(it);
> >
> > However, this was not the case. Fix that by adding a new
> > function _Rb_tree<>::_M_erase_unique() that is essentially
> > equivalent to the above snippet, and use this from both
> > std::map and std::set.
> 
> Hi, this change looks reasonable, thanks for the patch. Please note
> that GCC is currently in "stage 3" of its dev process so this change
> would have to wait until after GCC 14 branches from trunk, due in a
> few weeks.

OK; I didn't know that, thanks for telling me.


> 
> I assume you ran the testsuite with no regressions. [...]


I hope so. I ran `make check-target-libstdc++-v3`, and it did not note any
unexpected failures as far as I can see:

  Native configuration is x86_64-pc-linux-gnu

=== libstdc++ tests ===

  Schedule of variations:
  unix

  Running target unix
  Using /usr/share/dejagnu/baseboards/unix.exp as board description file for 
target.
  Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
  Using /gcc/libstdc++-v3/testsuite/config/default.exp as 
tool-and-target-specific interface file.
  Running /gcc/libstdc++-v3/testsuite/libstdc++-abi/abi.exp ...
  Running /gcc/libstdc++-v3/testsuite/libstdc++-dg/conformance.exp ...
  Running 
/gcc/libstdc++-v3/testsuite/libstdc++-prettyprinters/prettyprinters.exp ...
  Running /gcc/libstdc++-v3/testsuite/libstdc++-xmethods/xmethods.exp ...

=== libstdc++ Summary ===

  # of expected passes  18646
  # of expected failures126
  # of unsupported tests672

> [...] Do you have benchmarks to show this making a difference?


As for benchmarks, I do not have any. But even if the performance does not
improve appreciably, the size of the generated code will definitely be smaller.
And in the end, the excessive code was the reason I opened the mentioned 
issue[0]
in the first place, which should be eliminated hopefully.


> [...]


Regards,
Barnabás Pőcze


[0]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112934


[Bug target/114334] [14 Regression] ICE: in extract_insn, at recog.cc:2812 (unrecognizable insn and:HF?) with lroundf16() and -ffast-math -mavx512fp16

2024-03-14 Thread liuhongt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114334

Hongtao Liu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2024-03-15
 CC||liuhongt at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Hongtao Liu  ---
Mine

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

2024-03-14 Thread Ken Matsui
On Fri, Mar 8, 2024 at 9:17 AM Patrick Palka  wrote:
>
> On Wed, 28 Feb 2024, Ken Matsui wrote:
>
> > 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.
>
> Thanks, this looks great!  This generic build_invoke function could be
> used for invoke_result etc as well, and it could also cache the built-up
> call across __is_invocable and __is_nothrow_invocable checks on the same
> arguments (which is a common pattern in the standard library).  LGTM
>
> >
> > 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 | 132 +
> >  gcc/cp/semantics.cc  |   4 +
> >  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, 720 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 23ea66d9c12..c87b126fdb1 100644
> > --- a/gcc/cp/constraint.cc
> > +++ b/gcc/cp/constraint.cc
> > @@ -3791,6 +3791,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 85056c8140b..6cb2b55f4ea 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 334c11396c2..261d3a71faa 100644
> > --- a/gcc/cp/cp-tree.h
> > +++ b/gcc/cp/cp-tree.h
> > @@ -7334,6 +7334,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 98c10e6a8b5..953f1bed6fc 100644
> > --- a/gcc/cp/method.cc
> > +++ b/gcc/cp/method.cc
> > @@ -1928,6 +1928,138 @@ 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 (fn_type == error_mark_node || arg_types == error_mark_node)
> > +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);
> > +
> > 

Results for 14.0.1 20240315 (experimental) [remotes/origin/HEAD r14-9485-gc1f6690b821] (GCC) testsuite on powerpc64le-unknown-linux-gnu

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


git commit g:c1f6690b821f06616d442d732b24473d91eca66a
gcc-descr r14-9485-gc1f6690b821f06

power9
Linux 5.15.0-97-generic ppc64le
GNU Make 4.3

DejaGnu:
DejaGnu version 1.6.2
Expect version  5.45.4
Tcl version 8.6

64-bit

LAST_UPDATED: Fri Mar 15 00:22:36 UTC 2024 (revision r14-9485-gc1f6690b821)

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  -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/pr43051-1.c   -O1  -DPREVENT_OPTIMIZATION  line 34 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O1  -DPREVENT_OPTIMIZATION  line 39 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2  -DPREVENT_OPTIMIZATION  line 34 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2  -DPREVENT_OPTIMIZATION  line 39 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 34 c == [0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 39 c == [0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 34 c == [0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 39 c == [0]
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  

[Bug target/110027] [11/12/13/14 regression] Misaligned vector store on detect_stack_use_after_return

2024-03-14 Thread liuhongt at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110027

--- Comment #15 from Hongtao Liu  ---
A patch is posted at
https://gcc.gnu.org/pipermail/gcc-patches/2024-March/647604.html

[Bug testsuite/114343] [13 regression] many erratic errors starting with r13-8433-g1277f69b9b0206

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

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2024-03-15
   Keywords||testsuite-fail
 Ever confirmed|0   |1

--- Comment #2 from Andrew Pinski  ---
.

RE: [PATCH v3] RISC-V: Introduce gcc attribute riscv_rvv_vector_bits for RVV

2024-03-14 Thread Li, Pan2
> Shouldn't a major user-facing change like this be discussed in a PR against
> https://github.com/riscv-non-isa/riscv-c-api-doc/ or
> https://github.com/riscv-non-isa/rvv-intrinsic-doc before or concurrent with
> compiler implementation?

I think Kito is working on the spec doc already.

Hi Kito
Could you please help to correct me the behavior of the riscv_rvv_vector_bits 
attribute?
Sort of details and I suspect there is something missing, or different behavior 
compared with clang side.

Pan

-Original Message-
From: Stefan O'Rear  
Sent: Tuesday, March 12, 2024 9:25 PM
To: Li, Pan2 ; gcc-patches@gcc.gnu.org
Cc: juzhe.zh...@rivai.ai; Kito Cheng ; Wang, Yanzhang 
; rdapp@gmail.com; Vineet Gupta 
; Palmer Dabbelt 
Subject: Re: [PATCH v3] RISC-V: Introduce gcc attribute riscv_rvv_vector_bits 
for RVV

On Tue, Mar 12, 2024, at 2:15 AM, pan2...@intel.com wrote:
> From: Pan Li 
>
> Update in v3:
> * Add pre-defined __riscv_v_fixed_vlen when zvl.
>
> Update in v2:
> * Cleanup some unused code.
> * Fix some typo of commit log.
>
> Original log:
>
> This patch would like to introduce one new gcc attribute for RVV.
> This attribute is used to define fixed-length variants of one
> existing sizeless RVV types.
>
> This attribute is valid if and only if the mrvv-vector-bits=zvl, the only
> one args should be the integer constant and its' value is terminated
> by the LMUL and the vector register bits in zvl*b.  For example:
>
> typedef vint32m2_t fixed_vint32m2_t 
> __attribute__((riscv_rvv_vector_bits(128)));
>
> The above type define is valid when -march=rv64gc_zve64d_zvl64b
> (aka 2(m2) * 64 = 128 for vin32m2_t), and will report error when
> -march=rv64gcv_zvl128b similar to below.
>
> "error: invalid RVV vector size '128', expected size is '256' based on
> LMUL of type and '-mrvv-vector-bits=zvl'"
>
> Meanwhile, a pre-define macro __riscv_v_fixed_vlen is introduced to
> represent the fixed vlen in a RVV vector register.

Shouldn't a major user-facing change like this be discussed in a PR against
https://github.com/riscv-non-isa/riscv-c-api-doc/ or
https://github.com/riscv-non-isa/rvv-intrinsic-doc before or concurrent with
compiler implementation?

-s

> For the vint*m*_t below operations are allowed.
> * The sizeof.
> * The global variable(s).
> * The element of union and struct.
> * The cast to other equalities.
> * CMP: >, <, ==, !=, <=, >=
> * ALU: +, -, *, /, %, &, |, ^, >>, <<, ~, -
>
> For the vfloat*m*_t below operations are allowed.
> * The sizeof.
> * The global variable(s).
> * The element of union and struct.
> * The cast to other equalities.
> * CMP: >, <, ==, !=, <=, >=
> * ALU: +, -, *, /, -
>
> For the vbool*_t types only below operations are allowed except
> the CMP and ALU. The CMP and ALU operations on vbool*_t is not
> well defined currently.
> * The sizeof.
> * The global variable(s).
> * The element of union and struct.
> * The cast to other equalities.
>
> For the vint*x*m*_t tuple types are not suppored in this patch
> which is compatible with clang.
>
> This patch passed the below testsuites.
> * The riscv fully regression tests.
>
> gcc/ChangeLog:
>
>   * config/riscv/riscv-c.cc (riscv_cpu_cpp_builtins): Add pre-define
>   macro __riscv_v_fixed_vlen when zvl.
>   * config/riscv/riscv.cc (riscv_handle_rvv_vector_bits_attribute):
>   New static func to take care of the RVV types decorated by
>   the attributes.
>
> gcc/testsuite/ChangeLog:
>
>   * gcc.target/riscv/rvv/base/riscv_rvv_vector_bits-1.c: New test.
>   * gcc.target/riscv/rvv/base/riscv_rvv_vector_bits-10.c: New test.
>   * gcc.target/riscv/rvv/base/riscv_rvv_vector_bits-11.c: New test.
>   * gcc.target/riscv/rvv/base/riscv_rvv_vector_bits-12.c: New test.
>   * gcc.target/riscv/rvv/base/riscv_rvv_vector_bits-13.c: New test.
>   * gcc.target/riscv/rvv/base/riscv_rvv_vector_bits-14.c: New test.
>   * gcc.target/riscv/rvv/base/riscv_rvv_vector_bits-15.c: New test.
>   * gcc.target/riscv/rvv/base/riscv_rvv_vector_bits-16.c: New test.
>   * gcc.target/riscv/rvv/base/riscv_rvv_vector_bits-17.c: New test.
>   * gcc.target/riscv/rvv/base/riscv_rvv_vector_bits-2.c: New test.
>   * gcc.target/riscv/rvv/base/riscv_rvv_vector_bits-3.c: New test.
>   * gcc.target/riscv/rvv/base/riscv_rvv_vector_bits-4.c: New test.
>   * gcc.target/riscv/rvv/base/riscv_rvv_vector_bits-5.c: New test.
>   * gcc.target/riscv/rvv/base/riscv_rvv_vector_bits-6.c: New test.
>   * gcc.target/riscv/rvv/base/riscv_rvv_vector_bits-7.c: New test.
>   * gcc.target/riscv/rvv/base/riscv_rvv_vector_bits-8.c: New test.
>   * gcc.target/riscv/rvv/base/riscv_rvv_vector_bits-9.c: New test.
>   * gcc.target/riscv/rvv/base/riscv_rvv_vector_bits.h: New test.
>
> Signed-off-by: Pan Li 
> ---
>  gcc/config/riscv/riscv-c.cc   |   3 +
>  gcc/config/riscv/riscv.cc |  87 +-
>  .../riscv/rvv/base/riscv_rvv_vector_bits-1.c  |   6 +
>  

[Bug target/114344] [arm/mips] __alignof__ report a member packed struct as 1, while normal load/store instruction is used

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

--- Comment #2 from Andrew Pinski  ---
Note __alignof__ might say 1, but alignof vs what GCC knows the alignment of
the decl are 2 different things.

Results for 14.0.1 20240314 (experimental) [master-ia32 r14-9483-g6dbf0d252f6] (GCC) testsuite on i686-pc-linux-gnu

2024-03-14 Thread H.J. Lu via Gcc-testresults
# of unexpected successes   27
# of expected failures  1556
# of unsupported tests  4063
/export/gnu/import/git/gcc-test-master-ia32/bld/gcc/xgcc  version 14.0.1 
20240314 (experimental) [master-ia32 r14-9483-g6dbf0d252f6] (GCC) 

=== gfortran tests ===


Running target unix

=== gfortran Summary ===

# of expected passes69373
# of expected failures  275
# of unsupported tests  224
/export/gnu/import/git/gcc-test-master-ia32/bld/gcc/gfortran  version 14.0.1 
20240314 (experimental) [master-ia32 r14-9483-g6dbf0d252f6] (GCC) 

=== g++ tests ===


Running target unix
FAIL: g++.dg/guality/pr55665.C   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  line 23 p == 40
FAIL: g++.dg/torture/pr104601.C   -O0  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O1  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O3 -g  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -Os  (test for excess errors)

=== g++ Summary ===

# of expected passes260021
# of unexpected failures8
# of expected failures  2753
# of unsupported tests  10969
/export/gnu/import/git/gcc-test-master-ia32/bld/gcc/xg++  version 14.0.1 
20240314 (experimental) [master-ia32 r14-9483-g6dbf0d252f6] (GCC) 

=== objc tests ===


Running target unix

=== objc Summary ===

# of expected passes2840
# of expected failures  6
# of unsupported tests  70
/export/gnu/import/git/gcc-test-master-ia32/bld/gcc/xgcc  version 14.0.1 
20240314 (experimental) [master-ia32 r14-9483-g6dbf0d252f6] (GCC) 

=== libatomic tests ===


Running target unix

=== libatomic Summary ===

# of expected passes44
# of unsupported tests  5
=== libgomp tests ===


Running target unix

=== libgomp Summary ===

# of expected passes16335
# of expected failures  285
# of unsupported tests  621
=== libitm tests ===


Running target unix

=== libitm Summary ===

# of expected passes44
# of expected failures  3
# of unsupported tests  1
=== libstdc++ tests ===


Running target unix

=== libstdc++ Summary ===

# of expected passes19280
# of expected failures  126
# of unsupported tests  374

Compiler version: 14.0.1 20240314 (experimental) [master-ia32 
r14-9483-g6dbf0d252f6] (GCC) 
Platform: i686-pc-linux-gnu
configure flags: --enable-clocale=gnu --with-system-zlib --enable-shared 
--enable-cet --with-demangler-in-ld --enable-libmpx --prefix=/usr/gcc-14.0.1 
i686-linux --with-fpmath=sse


Regressions on master at commit r14-9483 vs commit r14-9469 on Linux/i686

2024-03-14 Thread H.J. Lu via Gcc-regression
Regressions on master at commit r14-9483 vs commit r14-9469 on Linux/i686
New failures:
FAIL: g++.dg/torture/pr104601.C   -O0  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O1  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O3 -g  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -Os  (test for excess errors)

New passes:


Results for 14.0.1 20240315 (experimental) [remotes/origin/master r14-9485-gc1f6690b821] (GCC) testsuite on pru-unknown-elf

2024-03-14 Thread The GnuPru BuildBot via Gcc-testresults
LAST_UPDATED: Fri Mar 15 01:00:11 UTC 2024 (revision r14-9485-gc1f6690b821)

Target is pru-unknown-elf
Host   is x86_64-pc-linux-gnu

=== gcc tests ===


Running target pru-sim
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 46-61
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
FAIL: c-c++-common/pr103798-2.c  -Wc++-compat   scan-assembler-not memchr
FAIL: c-c++-common/pr103798-3.c  -Wc++-compat   scan-assembler-not memchr
FAIL: c-c++-common/pr103798-4.c  -Wc++-compat   scan-assembler-not memchr
FAIL: gcc.dg/20141029-1.c scan-rtl-dump-times final "mem/v(/.)*:HI" 4
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for short (test for 
warnings, line 51)
XPASS: gcc.dg/attr-alloc_size-11.c missing range info for signed char (test for 
warnings, line 50)
FAIL: gcc.dg/c23-nullptr-1.c (test for excess errors)
UNRESOLVED: gcc.dg/c23-nullptr-1.c compilation failed to produce executable
FAIL: gcc.dg/gnu23-tag-composite-1.c  (test for errors, line 43)
FAIL: gcc.dg/gnu23-tag-composite-1.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/pr110279-1.c scan-tree-dump-times widening_mul "Generated FMA" 3
FAIL: gcc.dg/pr23623.c scan-rtl-dump-times final "mem/v(/.)*:SI" 12
FAIL: gcc.dg/pr82929-2.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/pr82929.c scan-tree-dump-times store-merging "Merging successful" 1
FAIL: gcc.dg/pr84877.c execution test
FAIL: gcc.dg/store_merging_1.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_10.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_11.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_13.c scan-tree-dump-times store-merging "Merging 
successful" 13
FAIL: gcc.dg/store_merging_14.c scan-tree-dump-times store-merging "Merging 
successful" 9
FAIL: gcc.dg/store_merging_15.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_2.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_20.c scan-tree-dump-times store-merging "Merging 
successful" 3
FAIL: gcc.dg/store_merging_21.c scan-tree-dump-times store-merging "Merging 
successful" 4
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_22.c scan-tree-dump-times store-merging "New 
sequence of 1 stores to replace old one of 3 stores" 1
FAIL: gcc.dg/store_merging_26.c scan-tree-dump store-merging "New sequence of 1 
stores to replace old one of 2 stores"
FAIL: gcc.dg/store_merging_27.c scan-tree-dump store-merging "New sequence of 
[12] stores to replace old one of 3 stores"
FAIL: gcc.dg/store_merging_28.c scan-tree-dump-times store-merging "New 
sequence of [24] stores to replace old one of 6 stores" 1
FAIL: gcc.dg/store_merging_29.c scan-tree-dump store-merging "New sequence of 3 
stores to replace old one of 6 stores"
FAIL: gcc.dg/store_merging_4.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "MEM 
 [.*]" 1
FAIL: gcc.dg/store_merging_5.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_7.c scan-tree-dump-times store-merging "Merging 
successful" 1
FAIL: gcc.dg/store_merging_8.c scan-tree-dump-times store-merging "Merging 
successful" 2
FAIL: gcc.dg/store_merging_9.c scan-tree-dump-times store-merging "Merging 
successful" 2
WARNING: gcc.dg/torture/pr112305.c   -O0  execution test program timed out.
FAIL: gcc.dg/torture/pr112305.c   -O0  execution test
FAIL: gcc.dg/tree-ssa/copy-headers-8.c scan-tree-dump-times ch2 "Conditional 
combines static and invariant" 1
FAIL: gcc.dg/tree-ssa/copy-headers-8.c scan-tree-dump-times ch2 "Will duplicate 
bb" 2
FAIL: gcc.dg/tree-ssa/ctz-char.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-complement-char.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-complement-int.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: gcc.dg/tree-ssa/ctz-complement-long.c scan-tree-dump-times optimized 
"__builtin_ctz|.CTZ" 1
FAIL: 

[Bug target/114344] [arm/mips] __alignof__ report a member packed struct as 1, while normal load/store instruction is used

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

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |INVALID

--- Comment #1 from Andrew Pinski  ---
(insn 5 4 6 (set (reg/f:SI 115)
(symbol_ref:SI ("*.LANCHOR0") [flags 0x182])) "/app/example.cpp":13:13
-1
 (nil))

(insn 6 5 7 (set (reg:SI 116)
(const_int 305419896 [0x12345678])) "/app/example.cpp":13:13 -1
 (nil))

(insn 7 6 0 (set (mem/v/c:SI (plus:SI (reg/f:SI 115)
(const_int 4 [0x4])) [2 sD.6114.iD.6110+0 S4 A32])
(reg:SI 116)) "/app/example.cpp":13:13 -1
 (nil))

.align  2
.set.LANCHOR0,. + 0
.type   s, %object
.size   s, 28
s:

The s variable is still aligned to 4 bytes so s.i is still aligned.

Doing:
`s __attribute__((aligned(1)));`

Makes the variable s unknown alignment and we get the multiple stores then.

[PATCH v2 0/3] LoongArch: Cleanup unused/redundant codes.

2024-03-14 Thread Chenghui Pan
Changes from v1: Some correction about ChangeLog format.

There's some unused/redundant definitions inside LoongArch target support
codes, these patches make a simple cleanup. Regression test passed.

Chenghui Pan (3):
  LoongArch: Remove unused/useless definitions.
  LoongArch: Change loongarch_expand_vec_cmp()'s return type from bool
to void.
  LoongArch: Combine UNITS_PER_FP_REG and UNITS_PER_FPREG macros.

 gcc/config/loongarch/lasx.md|  6 ++--
 gcc/config/loongarch/loongarch-protos.h |  7 +
 gcc/config/loongarch/loongarch.cc   | 39 -
 gcc/config/loongarch/loongarch.h|  7 ++---
 gcc/config/loongarch/lsx.md |  6 ++--
 5 files changed, 13 insertions(+), 52 deletions(-)

-- 
2.39.3



[PATCH v2 3/3] LoongArch: Combine UNITS_PER_FP_REG and UNITS_PER_FPREG macros.

2024-03-14 Thread Chenghui Pan
These macros are completely same in definition, so we can keep the previous one
and eliminate later one.

gcc/ChangeLog:

* config/loongarch/loongarch.cc
(loongarch_hard_regno_mode_ok_uncached): Combine UNITS_PER_FP_REG and
UNITS_PER_FPREG macros.
(loongarch_hard_regno_nregs): Ditto.
(loongarch_class_max_nregs): Ditto.
(loongarch_get_separate_components): Ditto.
(loongarch_process_components): Ditto.
* config/loongarch/loongarch.h (UNITS_PER_FPREG): Ditto.
(UNITS_PER_HWFPVALUE): Ditto.
(UNITS_PER_FPVALUE): Ditto.
---
 gcc/config/loongarch/loongarch.cc | 10 +-
 gcc/config/loongarch/loongarch.h  |  7 ++-
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/gcc/config/loongarch/loongarch.cc 
b/gcc/config/loongarch/loongarch.cc
index 7ef04329668..8f657ee1f9c 100644
--- a/gcc/config/loongarch/loongarch.cc
+++ b/gcc/config/loongarch/loongarch.cc
@@ -6770,7 +6770,7 @@ loongarch_hard_regno_mode_ok_uncached (unsigned int 
regno, machine_mode mode)
 and TRUNC.  There's no point allowing sizes smaller than a word,
 because the FPU has no appropriate load/store instructions.  */
   if (mclass == MODE_INT)
-   return size >= MIN_UNITS_PER_WORD && size <= UNITS_PER_FPREG;
+   return size >= MIN_UNITS_PER_WORD && size <= UNITS_PER_FP_REG;
 }
 
   return false;
@@ -6813,7 +6813,7 @@ loongarch_hard_regno_nregs (unsigned int regno, 
machine_mode mode)
   if (LASX_SUPPORTED_MODE_P (mode))
return 1;
 
-  return (GET_MODE_SIZE (mode) + UNITS_PER_FPREG - 1) / UNITS_PER_FPREG;
+  return (GET_MODE_SIZE (mode) + UNITS_PER_FP_REG - 1) / UNITS_PER_FP_REG;
 }
 
   /* All other registers are word-sized.  */
@@ -6848,7 +6848,7 @@ loongarch_class_max_nregs (enum reg_class rclass, 
machine_mode mode)
  else if (LSX_SUPPORTED_MODE_P (mode))
size = MIN (size, UNITS_PER_LSX_REG);
  else
-   size = MIN (size, UNITS_PER_FPREG);
+   size = MIN (size, UNITS_PER_FP_REG);
}
   left &= ~reg_class_contents[FP_REGS];
 }
@@ -8222,7 +8222,7 @@ loongarch_get_separate_components (void)
if (IMM12_OPERAND (offset))
  bitmap_set_bit (components, regno);
 
-   offset -= UNITS_PER_FPREG;
+   offset -= UNITS_PER_FP_REG;
   }
 
   /* Don't mess with the hard frame pointer.  */
@@ -8301,7 +8301,7 @@ loongarch_process_components (sbitmap components, 
loongarch_save_restore_fn fn)
if (bitmap_bit_p (components, regno))
  loongarch_save_restore_reg (mode, regno, offset, fn);
 
-   offset -= UNITS_PER_FPREG;
+   offset -= UNITS_PER_FP_REG;
   }
 }
 
diff --git a/gcc/config/loongarch/loongarch.h b/gcc/config/loongarch/loongarch.h
index bf2351f0968..888a633961d 100644
--- a/gcc/config/loongarch/loongarch.h
+++ b/gcc/config/loongarch/loongarch.h
@@ -138,19 +138,16 @@ along with GCC; see the file COPYING3.  If not see
 /* Width of a LASX vector register in bits.  */
 #define BITS_PER_LASX_REG (UNITS_PER_LASX_REG * BITS_PER_UNIT)
 
-/* For LARCH, width of a floating point register.  */
-#define UNITS_PER_FPREG (TARGET_DOUBLE_FLOAT ? 8 : 4)
-
 /* The largest size of value that can be held in floating-point
registers and moved with a single instruction.  */
 #define UNITS_PER_HWFPVALUE \
-  (TARGET_SOFT_FLOAT ? 0 : UNITS_PER_FPREG)
+  (TARGET_SOFT_FLOAT ? 0 : UNITS_PER_FP_REG)
 
 /* The largest size of value that can be held in floating-point
registers.  */
 #define UNITS_PER_FPVALUE \
   (TARGET_SOFT_FLOAT ? 0 \
-   : TARGET_SINGLE_FLOAT ? UNITS_PER_FPREG \
+   : TARGET_SINGLE_FLOAT ? UNITS_PER_FP_REG \
 : LONG_DOUBLE_TYPE_SIZE / BITS_PER_UNIT)
 
 /* The number of bytes in a double.  */
-- 
2.39.3



[PATCH v2 2/3] LoongArch: Change loongarch_expand_vec_cmp()'s return type from bool to void.

2024-03-14 Thread Chenghui Pan
This function is always return true at the end of function implementation,
so the return value is useless.

gcc/ChangeLog:

* config/loongarch/lasx.md (vec_cmp): Remove checking
of loongarch_expand_vec_cmp()'s return value.
(vec_cmpu): Ditto.
* config/loongarch/lsx.md (vec_cmp): Ditto.
(vec_cmpu): Ditto.
* config/loongarch/loongarch-protos.h
(loongarch_expand_vec_cmp): Change loongarch_expand_vec_cmp()'s return
type from bool to void.
* config/loongarch/loongarch.cc (loongarch_expand_vec_cmp): Ditto.
---
 gcc/config/loongarch/lasx.md| 6 ++
 gcc/config/loongarch/loongarch-protos.h | 2 +-
 gcc/config/loongarch/loongarch.cc   | 3 +--
 gcc/config/loongarch/lsx.md | 6 ++
 4 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/gcc/config/loongarch/lasx.md b/gcc/config/loongarch/lasx.md
index ac84db7f0ce..8d4c6b4ec35 100644
--- a/gcc/config/loongarch/lasx.md
+++ b/gcc/config/loongarch/lasx.md
@@ -1383,8 +1383,7 @@ (define_expand "vec_cmp"
   (match_operand:LASX 3 "register_operand")]))]
   "ISA_HAS_LASX"
 {
-  bool ok = loongarch_expand_vec_cmp (operands);
-  gcc_assert (ok);
+  loongarch_expand_vec_cmp (operands);
   DONE;
 })
 
@@ -1395,8 +1394,7 @@ (define_expand "vec_cmpu"
   (match_operand:ILASX 3 "register_operand")]))]
   "ISA_HAS_LASX"
 {
-  bool ok = loongarch_expand_vec_cmp (operands);
-  gcc_assert (ok);
+  loongarch_expand_vec_cmp (operands);
   DONE;
 })
 
diff --git a/gcc/config/loongarch/loongarch-protos.h 
b/gcc/config/loongarch/loongarch-protos.h
index 871544f760c..e3ed2b912a5 100644
--- a/gcc/config/loongarch/loongarch-protos.h
+++ b/gcc/config/loongarch/loongarch-protos.h
@@ -95,7 +95,7 @@ extern void loongarch_split_lsx_fill_d (rtx, rtx);
 extern const char *loongarch_output_move (rtx, rtx);
 #ifdef RTX_CODE
 extern void loongarch_expand_scc (rtx *);
-extern bool loongarch_expand_vec_cmp (rtx *);
+extern void loongarch_expand_vec_cmp (rtx *);
 extern void loongarch_expand_conditional_branch (rtx *);
 extern void loongarch_expand_conditional_move (rtx *);
 extern void loongarch_expand_conditional_trap (rtx);
diff --git a/gcc/config/loongarch/loongarch.cc 
b/gcc/config/loongarch/loongarch.cc
index b25624c9406..7ef04329668 100644
--- a/gcc/config/loongarch/loongarch.cc
+++ b/gcc/config/loongarch/loongarch.cc
@@ -10801,13 +10801,12 @@ loongarch_expand_vec_cond_mask_expr (machine_mode 
mode, machine_mode vimode,
 }
 
 /* Expand integer vector comparison */
-bool
+void
 loongarch_expand_vec_cmp (rtx operands[])
 {
 
   rtx_code code = GET_CODE (operands[1]);
   loongarch_expand_lsx_cmp (operands[0], code, operands[2], operands[3]);
-  return true;
 }
 
 /* Implement TARGET_PROMOTE_FUNCTION_MODE.  */
diff --git a/gcc/config/loongarch/lsx.md b/gcc/config/loongarch/lsx.md
index b9b94b9079c..87d3e7c5d9f 100644
--- a/gcc/config/loongarch/lsx.md
+++ b/gcc/config/loongarch/lsx.md
@@ -518,8 +518,7 @@ (define_expand "vec_cmp"
   (match_operand:LSX 3 "register_operand")]))]
   "ISA_HAS_LSX"
 {
-  bool ok = loongarch_expand_vec_cmp (operands);
-  gcc_assert (ok);
+  loongarch_expand_vec_cmp (operands);
   DONE;
 })
 
@@ -530,8 +529,7 @@ (define_expand "vec_cmpu"
   (match_operand:ILSX 3 "register_operand")]))]
   "ISA_HAS_LSX"
 {
-  bool ok = loongarch_expand_vec_cmp (operands);
-  gcc_assert (ok);
+  loongarch_expand_vec_cmp (operands);
   DONE;
 })
 
-- 
2.39.3



[PATCH v2 1/3] LoongArch: Remove unused/useless definitions.

2024-03-14 Thread Chenghui Pan
This patch removes some unnecessary definitions of target hook functions
according to the documentation of GCC.

gcc/ChangeLog:

* config/loongarch/loongarch-protos.h
(loongarch_cfun_has_cprestore_slot_p): Delete.
(loongarch_adjust_insn_length): Delete.
(current_section_name): Delete.
(loongarch_split_symbol_type): Delete.
* config/loongarch/loongarch.cc
(loongarch_case_values_threshold): Delete.
(loongarch_spill_class): Delete.
(TARGET_OPTAB_SUPPORTED_P): Delete.
(TARGET_CASE_VALUES_THRESHOLD): Delete.
(TARGET_SPILL_CLASS): Delete.
---
 gcc/config/loongarch/loongarch-protos.h |  5 -
 gcc/config/loongarch/loongarch.cc   | 26 -
 2 files changed, 31 deletions(-)

diff --git a/gcc/config/loongarch/loongarch-protos.h 
b/gcc/config/loongarch/loongarch-protos.h
index 1fdfda9af01..871544f760c 100644
--- a/gcc/config/loongarch/loongarch-protos.h
+++ b/gcc/config/loongarch/loongarch-protos.h
@@ -93,7 +93,6 @@ extern void loongarch_split_lsx_copy_d (rtx, rtx, rtx, rtx 
(*)(rtx, rtx, rtx));
 extern void loongarch_split_lsx_insert_d (rtx, rtx, rtx, rtx);
 extern void loongarch_split_lsx_fill_d (rtx, rtx);
 extern const char *loongarch_output_move (rtx, rtx);
-extern bool loongarch_cfun_has_cprestore_slot_p (void);
 #ifdef RTX_CODE
 extern void loongarch_expand_scc (rtx *);
 extern bool loongarch_expand_vec_cmp (rtx *);
@@ -135,7 +134,6 @@ extern int loongarch_class_max_nregs (enum reg_class, 
machine_mode);
 extern machine_mode loongarch_hard_regno_caller_save_mode (unsigned int,
   unsigned int,
   machine_mode);
-extern int loongarch_adjust_insn_length (rtx_insn *, int);
 extern const char *loongarch_output_conditional_branch (rtx_insn *, rtx *,
const char *,
const char *);
@@ -157,7 +155,6 @@ extern bool loongarch_global_symbol_noweak_p (const_rtx);
 extern bool loongarch_weak_symbol_p (const_rtx);
 extern bool loongarch_symbol_binds_local_p (const_rtx);
 
-extern const char *current_section_name (void);
 extern unsigned int current_section_flags (void);
 extern bool loongarch_use_ins_ext_p (rtx, HOST_WIDE_INT, HOST_WIDE_INT);
 extern bool loongarch_check_zero_div_p (void);
@@ -198,8 +195,6 @@ extern bool loongarch_epilogue_uses (unsigned int);
 extern bool loongarch_load_store_bonding_p (rtx *, machine_mode, bool);
 extern bool loongarch_split_symbol_type (enum loongarch_symbol_type);
 
-typedef rtx (*mulsidi3_gen_fn) (rtx, rtx, rtx);
-
 extern void loongarch_register_frame_header_opt (void);
 extern void loongarch_expand_vec_cond_expr (machine_mode, machine_mode, rtx *);
 extern void loongarch_expand_vec_cond_mask_expr (machine_mode, machine_mode,
diff --git a/gcc/config/loongarch/loongarch.cc 
b/gcc/config/loongarch/loongarch.cc
index 70e31bb831c..b25624c9406 100644
--- a/gcc/config/loongarch/loongarch.cc
+++ b/gcc/config/loongarch/loongarch.cc
@@ -10810,23 +10810,6 @@ loongarch_expand_vec_cmp (rtx operands[])
   return true;
 }
 
-/* Implement TARGET_CASE_VALUES_THRESHOLD.  */
-
-unsigned int
-loongarch_case_values_threshold (void)
-{
-  return default_case_values_threshold ();
-}
-
-/* Implement TARGET_SPILL_CLASS.  */
-
-static reg_class_t
-loongarch_spill_class (reg_class_t rclass ATTRIBUTE_UNUSED,
-  machine_mode mode ATTRIBUTE_UNUSED)
-{
-  return NO_REGS;
-}
-
 /* Implement TARGET_PROMOTE_FUNCTION_MODE.  */
 
 /* This function is equivalent to default_promote_function_mode_always_promote
@@ -11281,9 +11264,6 @@ loongarch_asm_code_end (void)
 #undef TARGET_FUNCTION_ARG_BOUNDARY
 #define TARGET_FUNCTION_ARG_BOUNDARY loongarch_function_arg_boundary
 
-#undef TARGET_OPTAB_SUPPORTED_P
-#define TARGET_OPTAB_SUPPORTED_P loongarch_optab_supported_p
-
 #undef TARGET_VECTOR_MODE_SUPPORTED_P
 #define TARGET_VECTOR_MODE_SUPPORTED_P loongarch_vector_mode_supported_p
 
@@ -11353,18 +11333,12 @@ loongarch_asm_code_end (void)
 #undef TARGET_SCHED_REASSOCIATION_WIDTH
 #define TARGET_SCHED_REASSOCIATION_WIDTH loongarch_sched_reassociation_width
 
-#undef TARGET_CASE_VALUES_THRESHOLD
-#define TARGET_CASE_VALUES_THRESHOLD loongarch_case_values_threshold
-
 #undef TARGET_ATOMIC_ASSIGN_EXPAND_FENV
 #define TARGET_ATOMIC_ASSIGN_EXPAND_FENV loongarch_atomic_assign_expand_fenv
 
 #undef TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS
 #define TARGET_CALL_FUSAGE_CONTAINS_NON_CALLEE_CLOBBERS true
 
-#undef TARGET_SPILL_CLASS
-#define TARGET_SPILL_CLASS loongarch_spill_class
-
 #undef TARGET_HARD_REGNO_NREGS
 #define TARGET_HARD_REGNO_NREGS loongarch_hard_regno_nregs
 #undef TARGET_HARD_REGNO_MODE_OK
-- 
2.39.3



Results for 12.3.1 20240315 [releases/gcc-12 r12-10215-gcaabffc463] (GCC) testsuite on powerpc64le-unknown-linux-gnu

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


git commit g:caabffc463db169e4a54deade79abe0888df05b5
gcc-descr r12-10215-gcaabffc463db16

power9 IEEE128
Linux 6.8.0-0.rc6.20240229git805d849d7c3c.51.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: Fri Mar 15 00:27:06 UTC 2024 (revision r12-10215-gcaabffc463)

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

[Bug tree-optimization/106119] [12 Regression] Bogus use-after-free warning triggered by optimizer

2024-03-14 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106119

Jeffrey A. Law  changed:

   What|Removed |Added

Summary|[12/13/14 Regression] Bogus |[12 Regression] Bogus
   |use-after-free warning  |use-after-free warning
   |triggered by optimizer  |triggered by optimizer
 CC||law at gcc dot gnu.org

--- Comment #7 from Jeffrey A. Law  ---
Works with gcc-13 and the trunk.  Adjusting regression markers.

Results for 14.0.1 20240314 (experimental) [remotes/origin/HEAD r14-9484-gefab88888c] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-03-14 Thread Bill Seurer (POWER8) via Gcc-testresults
e-ssa/copy-headers-8.c scan-tree-dump-times ch2 "Will duplicate 
bb" 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/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 passes178055
# of unexpected failures148
# of unexpected successes   12
# of expected failures  1597
# of unsupported tests  4965
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xgcc  version 14.0.1 20240314 
(experimental) [remotes/origin/HEAD r14-9484-gefab8c] (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
FAIL: gfortran.dg/ieee/large_2.f90   -O3 -g  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -Os  execution test

=== gfortran Summary ===

# of expected passes69442
# of unexpected failures12
# of unexpected successes   6
# of expected failures  285
# of unsupported tests  173
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/gfortran  version 14.0.1 
20240314 (experimental) [remotes/origin/HEAD r14-9484-gefab8c] (GCC) 

=== g++ tests ===


Running target unix
FAIL: g++.dg/modules/target-powerpc-1_a.C -std=c++17 (test for excess errors)
FAIL: g++.dg/modules/target-powerpc-1_a.C -std=c++2a (test for excess errors)
FAIL: g++.dg/modules/target-powerpc-1_a.C -std=c++2b (test for excess errors)
FAIL: g++.dg/modules/target-powerpc-1_b.C -std=c++17 (test for excess errors)
FAIL: g++.dg/modules/target-powerpc-1_b.C -std=c++2a (test for excess errors)
FAIL: g++.dg/modules/target-powerpc-1_b.C -std=c++2b (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O0  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O1  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O3 -g  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -Os  (test for excess errors)

=== g++ Summary ===

# of expected passes259116
# of unexpected failures13
# of expected failures  2623
# of unsupported tests  11628
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xg++  version 14.0.1 20240314 
(experimental) [remotes/origin/HEAD r14-9484-gefab8c] (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 14.0.1 20240314 
(experimental) [remotes/origin/HEAD r14-9484-gefab8c] (GCC) 

=== objc tests ===


Running target unix

=== objc Summary ===

# of expected passes2846
# of unsupported tests  70
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xgcc  version 14.0.1 20240314 
(experimental) [remotes/origin/HEAD r14-9484-gefab8c] (GCC) 

=== libatomic tests ===


Running target unix

=== libatomic Summary ===

# 

[Bug tree-optimization/106238] [12 regression] Inline optimization causes dangling pointer warning on "include/c++/12.1.0/bits/stl_tree.h"

2024-03-14 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106238

Jeffrey A. Law  changed:

   What|Removed |Added

Summary|[12/13/14 regression]   |[12 regression] Inline
   |Inline optimization causes  |optimization causes
   |dangling pointer warning on |dangling pointer warning on
   |"include/c++/12.1.0/bits/st |"include/c++/12.1.0/bits/st
   |l_tree.h"   |l_tree.h"
 CC||law at gcc dot gnu.org

--- Comment #11 from Jeffrey A. Law  ---
Adjusting regression markers per c#10.

[Bug target/106342] [12/13/14 Regression] internal compiler error: in extract_insn, at recog.cc:2791 since r12-4240-g2b8453c401b699

2024-03-14 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106342

Jeffrey A. Law  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||law at gcc dot gnu.org
 Resolution|--- |FIXED

--- Comment #12 from Jeffrey A. Law  ---
Per c#8 and c#10.

Re: [PATCH] i386[stv]: Handle REG_EH_REGION note

2024-03-14 Thread Hongtao Liu
On Thu, Mar 14, 2024 at 10:46 PM Uros Bizjak  wrote:
>
> On Thu, Mar 14, 2024 at 8:42 AM Uros Bizjak  wrote:
> >
> > On Thu, Mar 14, 2024 at 8:32 AM Hongtao Liu  wrote:
> > >
> > > On Thu, Mar 14, 2024 at 3:22 PM Uros Bizjak  wrote:
> > > >
> > > > On Thu, Mar 14, 2024 at 2:33 AM liuhongt  wrote:
> > > > >
> > > > > When we split
> > > > > (insn 37 36 38 10 (set (reg:DI 104 [ _18 ])
> > > > > (mem:DI (reg/f:SI 98 [ CallNative_nclosure.0_1 ]) [6 
> > > > > MEM[(struct SQRefCounted *)CallNative_nclosure.0_1]._uiRef+0 S8 
> > > > > A32])) "test.C":22:42 84 {*movdi_internal}
> > > > >  (expr_list:REG_EH_REGION (const_int -11 [0xfff5])
> > > > >
> > > > > into
> > > > >
> > > > > (insn 104 36 37 10 (set (subreg:V2DI (reg:DI 124) 0)
> > > > > (vec_concat:V2DI (mem:DI (reg/f:SI 98 [ 
> > > > > CallNative_nclosure.0_1 ]) [6 MEM[(struct SQRefCounted 
> > > > > *)CallNative_nclosure.0_1]._uiRef+0 S8 A32])
> > > > > (const_int 0 [0]))) "test.C":22:42 -1
> > > > > (nil)))
> > > > > (insn 37 104 105 10 (set (subreg:V2DI (reg:DI 104 [ _18 ]) 0)
> > > > > (subreg:V2DI (reg:DI 124) 0)) "test.C":22:42 2024 
> > > > > {movv2di_internal}
> > > > >  (expr_list:REG_EH_REGION (const_int -11 [0xfff5])
> > > > > (nil)))
> > > > >
> > > > > we must copy the REG_EH_REGION note to the first insn and split the 
> > > > > block
> > > > > after the newly added insn.  The REG_EH_REGION on the second insn 
> > > > > will be
> > > > > removed later since it no longer traps.
> > > > >
> > > > > Currently we only handle memory_operand, are there any other insns
> > > > > need to be handled???
> > > >
> > > > I think memory access is the only thing that can trap.
> > > >
> > > > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,} for trunk 
> > > > > and gcc-13/gcc-12 release branch.
> > > > > Ok for trunk and backport?
> > > > >
> > > > > gcc/ChangeLog:
> > > > >
> > > > > * config/i386/i386-features.cc
> > > > > (general_scalar_chain::convert_op): Handle REG_EH_REGION note.
> > > > > (convert_scalars_to_vector): Ditto.
> > > > > * config/i386/i386-features.h (class scalar_chain): New
> > > > > memeber control_flow_insns.
> > > > >
> > > > > gcc/testsuite/ChangeLog:
> > > > >
> > > > > * g++.target/i386/pr111822.C: New test.
> > > > > ---
> > > > >  gcc/config/i386/i386-features.cc | 48 
> > > > > ++--
> > > > >  gcc/config/i386/i386-features.h  |  1 +
> > > > >  gcc/testsuite/g++.target/i386/pr111822.C | 45 ++
> > > > >  3 files changed, 90 insertions(+), 4 deletions(-)
> > > > >  create mode 100644 gcc/testsuite/g++.target/i386/pr111822.C
> > > > >
> > > > > diff --git a/gcc/config/i386/i386-features.cc 
> > > > > b/gcc/config/i386/i386-features.cc
> > > > > index 1de2a07ed75..2ed27a9ebdd 100644
> > > > > --- a/gcc/config/i386/i386-features.cc
> > > > > +++ b/gcc/config/i386/i386-features.cc
> > > > > @@ -998,20 +998,36 @@ general_scalar_chain::convert_op (rtx *op, 
> > > > > rtx_insn *insn)
> > > > >  }
> > > > >else if (MEM_P (*op))
> > > > >  {
> > > > > +  rtx_insn* eh_insn, *movabs = NULL;
> > > > >rtx tmp = gen_reg_rtx (GET_MODE (*op));
> > > > >
> > > > >/* Handle movabs.  */
> > > > >if (!memory_operand (*op, GET_MODE (*op)))
> > > > > {
> > > > >   rtx tmp2 = gen_reg_rtx (GET_MODE (*op));
> > > > > + movabs = emit_insn_before (gen_rtx_SET (tmp2, *op), insn);
> > > > >
> > > > > - emit_insn_before (gen_rtx_SET (tmp2, *op), insn);
> > > > >   *op = tmp2;
> > > > > }
> > > >
> > > > I may be missing something, but isn't the above a dead code? We have
> > > > if (MEM_p(*op)) and then if (!memory_operand (*op, ...)).
> > > It's PR91814 #c1, memory_operand will also check invalid memory addresses.
> >
> > Oh, it is even my comment ;)
> >
> > Perhaps the comment should be improved to something like:
> >
> > "Emit MOVABS to load from a 64-bit absolute address to a GPR."
> >
> > LGTM then.
>
> BTW: Do we need to also fix timode_scalar_chain::convert_op ? There we
> also preload operand, so a similar fix should be applied there.
Yes, I'll make another patch. Didn't realize there are 2 of them.
>
> Uros.



-- 
BR,
Hongtao


Re:[pushed] [PATCH v2] LoongArch: Remove masking process for operand 3 of xvpermi.q.

2024-03-14 Thread chenglulu

Pushed to r14-9486.

在 2024/3/14 上午9:26, Chenghui Pan 写道:

The behavior of non-zero unused bits in xvpermi.q instruction's
third operand is undefined on LoongArch, according to our
discussion (https://github.com/llvm/llvm-project/pull/83540),
we think that keeping original insn operand as unmodified
state is better solution.

This patch partially reverts 7b158e036a95b1ab40793dd53bed7dbd770ffdaf.

gcc/ChangeLog:

* config/loongarch/lasx.md (lasx_xvpermi_q_):
Remove masking of operand 3.

gcc/testsuite/ChangeLog:

* gcc.target/loongarch/vector/lasx/lasx-xvpermi_q.c:
Reposition operand 3's value into instruction's defined accept range.
---
  gcc/config/loongarch/lasx.md| 5 -
  .../gcc.target/loongarch/vector/lasx/lasx-xvpermi_q.c   | 6 +++---
  2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/gcc/config/loongarch/lasx.md b/gcc/config/loongarch/lasx.md
index ac84db7f0ce..3f25c0c1756 100644
--- a/gcc/config/loongarch/lasx.md
+++ b/gcc/config/loongarch/lasx.md
@@ -640,8 +640,6 @@ (define_insn "lasx_xvpermi_d__1"
 (set_attr "mode" "")])
  
  ;; xvpermi.q

-;; Unused bits in operands[3] need be set to 0 to avoid
-;; causing undefined behavior on LA464.
  (define_insn "lasx_xvpermi_q_"
[(set (match_operand:LASX 0 "register_operand" "=f")
(unspec:LASX
@@ -651,9 +649,6 @@ (define_insn "lasx_xvpermi_q_"
  UNSPEC_LASX_XVPERMI_Q))]
"ISA_HAS_LASX"
  {
-  int mask = 0x33;
-  mask &= INTVAL (operands[3]);
-  operands[3] = GEN_INT (mask);
return "xvpermi.q\t%u0,%u2,%3";
  }
[(set_attr "type" "simd_splat")
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvpermi_q.c 
b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvpermi_q.c
index dbc29d2fb22..f89dfc31120 100644
--- a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvpermi_q.c
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvpermi_q.c
@@ -27,7 +27,7 @@ main ()
*((unsigned long*)& __m256i_result[2]) = 0x7fff7fff7fff;
*((unsigned long*)& __m256i_result[1]) = 0x7fe37fe3001d001d;
*((unsigned long*)& __m256i_result[0]) = 0x7fff7fff7fff;
-  __m256i_out = __lasx_xvpermi_q (__m256i_op0, __m256i_op1, 0x2a);
+  __m256i_out = __lasx_xvpermi_q (__m256i_op0, __m256i_op1, 0x22);
ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
  
*((unsigned long*)& __m256i_op0[3]) = 0x;

@@ -42,7 +42,7 @@ main ()
*((unsigned long*)& __m256i_result[2]) = 0x0019001c;
*((unsigned long*)& __m256i_result[1]) = 0x;
*((unsigned long*)& __m256i_result[0]) = 0x01fe;
-  __m256i_out = __lasx_xvpermi_q (__m256i_op0, __m256i_op1, 0xb9);
+  __m256i_out = __lasx_xvpermi_q (__m256i_op0, __m256i_op1, 0x31);
ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
  
*((unsigned long*)& __m256i_op0[3]) = 0x00ff00ff00ff00ff;

@@ -57,7 +57,7 @@ main ()
*((unsigned long*)& __m256i_result[2]) = 0x;
*((unsigned long*)& __m256i_result[1]) = 0x00ff00ff00ff00ff;
*((unsigned long*)& __m256i_result[0]) = 0x00ff00ff00ff00ff;
-  __m256i_out = __lasx_xvpermi_q (__m256i_op0, __m256i_op1, 0xca);
+  __m256i_out = __lasx_xvpermi_q (__m256i_op0, __m256i_op1, 0x02);
ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
  
return 0;




[gcc r14-9486] LoongArch: Remove masking process for operand 3 of xvpermi.q.

2024-03-14 Thread LuluCheng via Gcc-cvs
https://gcc.gnu.org/g:d7d05824ae68da24908d97a10b9ec59d08f75a90

commit r14-9486-gd7d05824ae68da24908d97a10b9ec59d08f75a90
Author: Chenghui Pan 
Date:   Thu Mar 14 09:26:54 2024 +0800

LoongArch: Remove masking process for operand 3 of xvpermi.q.

The behavior of non-zero unused bits in xvpermi.q instruction's
third operand is undefined on LoongArch, according to our
discussion (https://github.com/llvm/llvm-project/pull/83540),
we think that keeping original insn operand as unmodified
state is better solution.

This patch partially reverts 7b158e036a95b1ab40793dd53bed7dbd770ffdaf.

gcc/ChangeLog:

* config/loongarch/lasx.md (lasx_xvpermi_q_):
Remove masking of operand 3.

gcc/testsuite/ChangeLog:

* gcc.target/loongarch/vector/lasx/lasx-xvpermi_q.c:
Reposition operand 3's value into instruction's defined accept 
range.

Diff:
---
 gcc/config/loongarch/lasx.md| 5 -
 gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvpermi_q.c | 6 +++---
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/gcc/config/loongarch/lasx.md b/gcc/config/loongarch/lasx.md
index ac84db7f0ce..3f25c0c1756 100644
--- a/gcc/config/loongarch/lasx.md
+++ b/gcc/config/loongarch/lasx.md
@@ -640,8 +640,6 @@
(set_attr "mode" "")])
 
 ;; xvpermi.q
-;; Unused bits in operands[3] need be set to 0 to avoid
-;; causing undefined behavior on LA464.
 (define_insn "lasx_xvpermi_q_"
   [(set (match_operand:LASX 0 "register_operand" "=f")
(unspec:LASX
@@ -651,9 +649,6 @@
  UNSPEC_LASX_XVPERMI_Q))]
   "ISA_HAS_LASX"
 {
-  int mask = 0x33;
-  mask &= INTVAL (operands[3]);
-  operands[3] = GEN_INT (mask);
   return "xvpermi.q\t%u0,%u2,%3";
 }
   [(set_attr "type" "simd_splat")
diff --git a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvpermi_q.c 
b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvpermi_q.c
index dbc29d2fb22..f89dfc31120 100644
--- a/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvpermi_q.c
+++ b/gcc/testsuite/gcc.target/loongarch/vector/lasx/lasx-xvpermi_q.c
@@ -27,7 +27,7 @@ main ()
   *((unsigned long*)& __m256i_result[2]) = 0x7fff7fff7fff;
   *((unsigned long*)& __m256i_result[1]) = 0x7fe37fe3001d001d;
   *((unsigned long*)& __m256i_result[0]) = 0x7fff7fff7fff;
-  __m256i_out = __lasx_xvpermi_q (__m256i_op0, __m256i_op1, 0x2a);
+  __m256i_out = __lasx_xvpermi_q (__m256i_op0, __m256i_op1, 0x22);
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
   *((unsigned long*)& __m256i_op0[3]) = 0x;
@@ -42,7 +42,7 @@ main ()
   *((unsigned long*)& __m256i_result[2]) = 0x0019001c;
   *((unsigned long*)& __m256i_result[1]) = 0x;
   *((unsigned long*)& __m256i_result[0]) = 0x01fe;
-  __m256i_out = __lasx_xvpermi_q (__m256i_op0, __m256i_op1, 0xb9);
+  __m256i_out = __lasx_xvpermi_q (__m256i_op0, __m256i_op1, 0x31);
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
   *((unsigned long*)& __m256i_op0[3]) = 0x00ff00ff00ff00ff;
@@ -57,7 +57,7 @@ main ()
   *((unsigned long*)& __m256i_result[2]) = 0x;
   *((unsigned long*)& __m256i_result[1]) = 0x00ff00ff00ff00ff;
   *((unsigned long*)& __m256i_result[0]) = 0x00ff00ff00ff00ff;
-  __m256i_out = __lasx_xvpermi_q (__m256i_op0, __m256i_op1, 0xca);
+  __m256i_out = __lasx_xvpermi_q (__m256i_op0, __m256i_op1, 0x02);
   ASSERTEQ_64 (__LINE__, __m256i_result, __m256i_out);
 
   return 0;


[Bug target/114344] New: [arm/mips] __alignof__ report a member packed struct as 1, while normal load/store instruction is used

2024-03-14 Thread syq at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114344

Bug ID: 114344
   Summary: [arm/mips] __alignof__ report a member packed struct
as 1, while normal load/store instruction is used
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: syq at gcc dot gnu.org
  Target Milestone: ---

#include 

volatile
struct s
{
  char c[4];
  int i;
  long long l;
  float f;
  double d;
} __attribute__ ((packed)) s;

int main() {
s.i = 0x12345678;
printf ("%zd\n", __alignof__ (s.i));
}


For this code, `1` is printed as the align of s.i. While on MIPS and ARM,
normal instructions are emitted.


$ mipsel-linux-gnu-gcc -Wall -mabi=32 -c -O3 xx.c -mips32r2
$ objdump -d xx.o
  ...
  34:   ac620004sw  v0,4(v1)
  ...
If `__alignof__ (s.i)` reports correctly, `swl/swr` should be used instead of
`sw`.

And for 
$ mipsel-linux-gnu-gcc -c -O3 xx.c -mips32r6 -mno-unaligned-access
$ arm-linux-gnueabihf-gcc -c -O3 xx.c -mno-unaligned-access

4 store_byte instruction should be used, while in fact, `sw/str` is used here.

[Bug tree-optimization/106757] [12/13 Regression] Incorrect "writing 1 byte into a region of size 0" on a vectorized loop

2024-03-14 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106757

Jeffrey A. Law  changed:

   What|Removed |Added

Summary|[12/13/14 Regression]   |[12/13 Regression]
   |Incorrect "writing 1 byte   |Incorrect "writing 1 byte
   |into a region of size 0" on |into a region of size 0" on
   |a vectorized loop   |a vectorized loop
 CC||law at gcc dot gnu.org

--- Comment #6 from Jeffrey A. Law  ---
Works correctly on the trunk.  Adjusting regression markers.

Results for 14.0.1 20240314 (experimental) [master revision gcc-14-9484-gefab88888c1] (GCC) testsuite on aarch64-unknown-linux-gnu

2024-03-14 Thread ci_notify--- via Gcc-testresults
# From https://ci.linaro.org/job/tcwg_gcc_check--master-aarch64-build/1716/:
LAST_UPDATED: 2024-03-15T00:25:13+00:00 (master revision 
gcc-14-9484-gefab8c1) aarch64-unknown-linux-gnu

Native configuration is aarch64-unknown-linux-gnu

=== libatomic tests ===


Running target tcwg-local

=== libatomic Summary ===

# of expected passes54
=== libgomp tests ===


Running target tcwg-local

=== libgomp Summary ===

# of expected passes16214
# of expected failures  284
# of unsupported tests  645
=== libitm tests ===


Running target tcwg-local

=== libitm Summary ===

# of expected passes44
# of expected failures  3
# of unsupported tests  1
=== libstdc++ tests ===


Running target tcwg-local

=== libstdc++ Summary ===

# of expected passes18535
# of expected failures  126
# of unsupported tests  742
=== gcc tests ===


Running target tcwg-local
FAIL: gcc.dg/guality/example.c   -O1  -DPREVENT_OPTIMIZATION  execution test
FAIL: gcc.dg/guality/pr43051-1.c   -O1  -DPREVENT_OPTIMIZATION  line 34 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O1  -DPREVENT_OPTIMIZATION  line 39 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2  -DPREVENT_OPTIMIZATION  line 34 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2  -DPREVENT_OPTIMIZATION  line 39 c == 
[0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 34 c == [0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 39 c == [0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 34 c == [0]
FAIL: gcc.dg/guality/pr43051-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 39 c == [0]
FAIL: gcc.dg/guality/pr54693-2.c   -O1  -DPREVENT_OPTIMIZATION  line 21 i == v 
+ 1
FAIL: gcc.dg/guality/pr54693-2.c   -O2  -DPREVENT_OPTIMIZATION  line 21 i == v 
+ 1
FAIL: gcc.dg/guality/pr54693-2.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 21 i == v + 1
FAIL: gcc.dg/guality/pr54693-2.c   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  -DPREVENT_OPTIMIZATION  line 21 i == 
v + 1
FAIL: gcc.dg/guality/pr54693-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 21 i == 
v + 1
FAIL: gcc.dg/guality/pr54693.c   -O2  -DPREVENT_OPTIMIZATION  line 22 i == c - 
48
FAIL: gcc.dg/guality/pr54693.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 22 i == c - 48
FAIL: gcc.dg/guality/pr54693.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 22 i == c - 48
FAIL: gcc.dg/guality/pr54693.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 22 i == c 
- 48
FAIL: gcc.dg/guality/pr54693.c   -Os  -DPREVENT_OPTIMIZATION  line 22 i == c - 
48
FAIL: gcc.dg/guality/pr89463.c   -O1  -DPREVENT_OPTIMIZATION  line 23 i + 1 == 7
FAIL: gcc.dg/guality/pr90074.c   -O1  -DPREVENT_OPTIMIZATION  line 28 c + 1 == 2
FAIL: gcc.dg/guality/pr90074.c   -O1  -DPREVENT_OPTIMIZATION  line 28 i + 1 == 8
FAIL: gcc.dg/guality/pr90716.c   -O1  -DPREVENT_OPTIMIZATION  line 23 j + 1 == 9
FAIL: gcc.dg/guality/pr90716.c   -O2  -DPREVENT_OPTIMIZATION  line 23 j + 1 == 9
FAIL: gcc.dg/guality/pr90716.c   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  -DPREVENT_OPTIMIZATION line 23 j + 1 == 9
FAIL: gcc.dg/guality/pr90716.c   -Os  -DPREVENT_OPTIMIZATION  line 23 j + 1 == 9
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   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 24 i == 5
FAIL: gcc.dg/guality/vla-1.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 24 sizeof (a) == 17 * sizeof 
(short)
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/tree-ssa/ssa-dom-thread-7.c scan-tree-dump thread2 "Jumps 
threaded: 18"

=== gcc Summary ===

# of expected passes343222
# of unexpected failures34
# of expected failures  1904
# of unsupported tests  4635
/home/tcwg-buildslave/workspace/tcwg_gnu_3/abe/builds/destdir/aarch64-unknown-linux-gnu/bin/aarch64-unknown-linux-gnu-gcc
  version 14.0.1 20240314 (experimental) [master revision 
gcc-14-9484-gefab888

[Bug sanitizer/113430] [11/12/13 only] Trivial program segfaults intermittently with ASAN with large CONFIG_ARCH_MMAP_RND_BITS in kernel configuration

2024-03-14 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113430

--- Comment #10 from Sam James  ---
I don't plan on pursuing it myself, leaving it to someone else, as I can't
reproduce on my main workstation and I don't want to faff w/ kernel config.

[Bug sanitizer/113430] [11/12/13 only] Trivial program segfaults intermittently with ASAN with large CONFIG_ARCH_MMAP_RND_BITS in kernel configuration

2024-03-14 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113430

--- Comment #9 from Sam James  ---
Created attachment 57708
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57708=edit
0001-libsanitizer-fix-ASAN-with-aggressive-CONFIG_ARCH_MM.patch

Untested patch for 13.

[Bug tree-optimization/106842] [12 Regression] misleading warning : iteration X invokes undefined behavior

2024-03-14 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106842

Jeffrey A. Law  changed:

   What|Removed |Added

Summary|[12/13/14 Regression]   |[12 Regression] misleading
   |misleading warning :|warning : iteration X
   |iteration X invokes |invokes undefined behavior
   |undefined behavior  |
 CC||law at gcc dot gnu.org

--- Comment #8 from Jeffrey A. Law  ---
Fixed in gcc-13.

Regressions on native/master at commit r14-9484 vs commit r14-9483 on Linux/x86_64

2024-03-14 Thread H. J. Lu via Gcc-regression
Regressions on native/master at commit r14-9484 vs commit r14-9483 on 
Linux/x86_64
New failures:
FAIL: gcc.dg/torture/convert-dfp-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: gcc.dg/torture/convert-dfp.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)

New passes:
FAIL: gcc.dg/lto/save-temps c_lto_save-temps_0.o-c_lto_save-temps_0.o link,  -O 
-flto -save-temps


C/C++ results under Intel SDE for 14.0.1 20240314 (experimental) [native/master r14-9484-gefab88888c1] (GCC) testsuite on x86_64-pc-linux-gnu

2024-03-14 Thread H. J. Lu via Gcc-testresults
-times vfnmsubps 1
FAIL: gcc.target/i386/fnabs.c scan-assembler-times \\tv?orp[sd][ \\t] 2
FAIL: gcc.target/i386/mask-unpack.c scan-tree-dump-times vect "vectorized 1 
loops" 10
FAIL: gcc.target/i386/pr100711-1.c scan-assembler-times pandn 2
FAIL: gcc.target/i386/pr100711-2.c scan-assembler-times vpandn 8
FAIL: gcc.target/i386/pr111068.c (test for excess errors)
FAIL: gcc.target/i386/pr42542-5a.c scan-assembler pcmpgtq
FAIL: gcc.target/i386/pr49168-1.c scan-assembler movups[\\t ]*%xmm[0-9]+,[^,]*
FAIL: gcc.target/i386/pr53652-1.c scan-assembler-not vpternlogq[ t]
FAIL: gcc.target/i386/pr53652-1.c scan-assembler-times pandn[ t] 2
XPASS: gcc.target/i386/pr54855-9.c scan-assembler-not movaps
FAIL: gcc.target/i386/pr57233.c scan-assembler vpslld[^\\n\\r]*2
FAIL: gcc.target/i386/pr57233.c scan-assembler vpsrld[^\\n\\r]*30
FAIL: gcc.target/i386/pr59390.c scan-assembler-not vfmadd
FAIL: gcc.target/i386/pr70322-3.c scan-assembler pxor
FAIL: gcc.target/i386/pr70325.c  (test for warnings, line 11)
FAIL: gcc.target/i386/pr70325.c (test for excess errors)
FAIL: gcc.target/i386/pr78904-4.c scan-assembler [ \\t]movb[\\t ]+%.h, t
FAIL: gcc.target/i386/pr80846-1.c scan-assembler-times vextracti 2
FAIL: gcc.target/i386/pr85950.c scan-assembler-times roundsd 2
FAIL: gcc.target/i386/pr91897.c scan-assembler-times movapd 8
FAIL: gcc.target/i386/pr92645.c scan-tree-dump-times optimized "vec_unpack_" 4
FAIL: gcc.target/i386/pr97873-1.c scan-assembler pabsq
FAIL: gcc.target/i386/recip-vec-divf-avx.c scan-assembler vrcpps[ 
t]+[^\\n]*%ymm
FAIL: gcc.target/i386/recip-vec-sqrtf-avx.c scan-assembler-times vrsqrtps[ 
t]+[^\\n]*%ymm 3
FAIL: gcc.target/i386/sse4_1-round-roundeven-1.c scan-assembler-times 
roundsd[^\\n\\r]*xmm 1
FAIL: gcc.target/i386/sse4_1-round-roundeven-1.c scan-assembler-times 
roundss[^\\n\\r]*xmm 1
FAIL: gcc.target/i386/vect-double-2.c scan-tree-dump-times vect "Vectorized 
loops: 1" 1
FAIL: gcc.target/i386/vect-pack-trunc-1.c scan-assembler-times vpmovwb[ 
t]+[^\\n]*%zmm 2
FAIL: gcc.target/i386/vect-pack-trunc-2.c scan-assembler-times vperm[it]2w[ 
t]+[^\\n]*%zmm 1
FAIL: gcc.target/i386/vect-perm-even-1.c scan-assembler-times vpmovwb[ 
t]+[^\\n]*%zmm 2
FAIL: gcc.target/i386/vect-perm-odd-1.c scan-assembler-times vpmovwb[ 
t]+[^\\n]*%zmm 4
FAIL: gcc.target/i386/vect-unpack-1.c scan-assembler-times vpmovzxbw[ 
t]+[^\\n]*%zmm 2
FAIL: gcc.target/i386/vect-unpack-2.c scan-assembler-times vpmovsxbw[ 
t]+[^\\n]*%zmm 2
FAIL: gcc.target/i386/vectorize4-avx.c scan-assembler vsqrtpd[ 
t]+[^\\n]*%ymm
FAIL: gcc.target/i386/vectorize7.c scan-assembler cvtdq2ps
FAIL: gcc.target/i386/xchg-2.c scan-assembler xchgb
FAIL: gcc.target/i386/xorsign.c scan-assembler-not [ \\t]or
FAIL: gcc.target/i386/xorsign.c scan-tree-dump-times vect "vectorized 2 loops" 1

=== gcc Summary for sde/-m32 ===

# of expected passes23551
# of unexpected failures90
# of unexpected successes   4
# of expected failures  31
# of unsupported tests  1041

=== gcc Summary ===

# of expected passes49464
# of unexpected failures195
# of unexpected successes   5
# of expected failures  56
# of unsupported tests  1462
/export/gnu/import/git/gcc-test-master-intel64-native/bld/gcc/xgcc  version 
14.0.1 20240314 (experimental) [native/master r14-9484-gefab8c1] (GCC) 

=== g++ tests ===


Running target sde
FAIL: g++.target/i386/mv28.C  -std=c++14  (test for errors, line 10)
FAIL: g++.target/i386/mv28.C  -std=c++14  (test for errors, line 11)
FAIL: g++.target/i386/mv28.C  -std=c++14  (test for errors, line 12)
FAIL: g++.target/i386/mv28.C  -std=c++14  (test for errors, line 13)
FAIL: g++.target/i386/mv28.C  -std=c++14  (test for errors, line 14)
FAIL: g++.target/i386/mv28.C  -std=c++14  (test for errors, line 15)
FAIL: g++.target/i386/mv28.C  -std=c++14  (test for errors, line 16)
FAIL: g++.target/i386/mv28.C  -std=c++14  (test for errors, line 17)
FAIL: g++.target/i386/mv28.C  -std=c++14  (test for errors, line 18)
FAIL: g++.target/i386/mv28.C  -std=c++14  (test for errors, line 19)
FAIL: g++.target/i386/mv28.C  -std=c++14  (test for errors, line 4)
FAIL: g++.target/i386/mv28.C  -std=c++14  (test for errors, line 5)
FAIL: g++.target/i386/mv28.C  -std=c++14  (test for errors, line 6)
FAIL: g++.target/i386/mv28.C  -std=c++14  (test for errors, line 7)
FAIL: g++.target/i386/mv28.C  -std=c++14  (test for errors, line 8)
FAIL: g++.target/i386/mv28.C  -std=c++14  (test for errors, line 9)
FAIL: g++.target/i386/mv28.C  -std=c++17  (test for errors, line 10)
FAIL: g++.target/i386/mv28.C  -std=c++17  (test for errors, line 11)
FAIL: g++.target/i386/mv28.C  -std=c++17  (test for errors, line 12)
FAIL: g++.target/i386/mv28.C  -std=c++17  (test for errors, line 13)
FAIL: g++.target/i386/mv28.C  -std=c++17  (test for errors, line 14)
FAIL: g++.target/i386/mv28.C  -std=c

[Bug tree-optimization/106931] [12 Regression] -Wstringop-overflow false positive -O3 -fno-tree-vectorize with loop unrolling since r12-3300-gece28da924ddda8b

2024-03-14 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106931

Jeffrey A. Law  changed:

   What|Removed |Added

Summary|[12/13/14 Regression]   |[12 Regression]
   |-Wstringop-overflow false   |-Wstringop-overflow false
   |positive  -O3   |positive  -O3
   |-fno-tree-vectorize with|-fno-tree-vectorize with
   |loop unrolling since|loop unrolling since
   |r12-3300-gece28da924ddda8b  |r12-3300-gece28da924ddda8b
 CC||law at gcc dot gnu.org

--- Comment #4 from Jeffrey A. Law  ---
False positive is fixed w/ gcc-13 and the trunk.

Results for 14.0.1 20240314 (experimental) [native/master r14-9484-gefab88888c1] (GCC) testsuite on x86_64-pc-linux-gnu

2024-03-14 Thread H. J. Lu via Gcc-testresults
LAST_UPDATED: Thu Mar 14 22:40:05 UTC 2024 (revision r14-9484-gefab8c1)

Native configuration is x86_64-pc-linux-gnu

=== gcc tests ===


Running target unix
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/ira-loop-pressure.c scan-rtl-dump loop2_invariant "Decided to move 
invariant"
XPASS: gcc.dg/guality/example.c   -O0  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   -O3 -fomit-frame-pointer -funroll-loops 
-fpeel-loops -ftracer -finline-functions  -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-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 18 arg7 == 30
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 arg1 
== 1
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 arg2 
== 2
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 arg3 
== 3
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 arg4 
== 4
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 arg5 
== 5
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 arg6 
== 6
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 16 arg7 
== 30
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 18 arg1 
== 1
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 18 arg2 
== 2
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 18 arg3 
== 3
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 18 arg4 
== 4
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 18 arg5 
== 5
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  line 18 arg6 
== 6
FAIL: gcc.dg/guality/pr36728-2.c   -O3 -g  -DPREVENT_OPTIMIZATION  

[Bug c++/107138] [12 regression] std::variant triggers false-positive 'may be used uninitialized' warning

2024-03-14 Thread law at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107138

Jeffrey A. Law  changed:

   What|Removed |Added

Summary|[12/13/14 regression]   |[12 regression]
   |std::variant triggers   |...> triggers
   |false-positive 'may be used |false-positive 'may be used
   |uninitialized' warning  |uninitialized' warning
 CC||law at gcc dot gnu.org

--- Comment #14 from Jeffrey A. Law  ---
Works with gcc-13 and gcc-14.  Adjusting regression markers.

[Bug sanitizer/89323] Asan memory leak detection on 32bit x86 linux platform

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

--- Comment #7 from Andrew Pinski  ---
This might work but I can't test it with x32:
```
diff --git a/libsanitizer/configure.tgt b/libsanitizer/configure.tgt
index 77a0e68222b..eb99edefbd3 100644
--- a/libsanitizer/configure.tgt
+++ b/libsanitizer/configure.tgt
@@ -25,9 +25,9 @@ case "${target}" in
   x86_64-*-freebsd* | i?86-*-freebsd*)
;;
   x86_64-*-linux* | i?86-*-linux*)
+   LSAN_SUPPORTED=yes
if test x$ac_cv_sizeof_void_p = x8; then
TSAN_SUPPORTED=yes
-   LSAN_SUPPORTED=yes
TSAN_TARGET_DEPENDENT_OBJECTS=tsan_rtl_amd64.lo
HWASAN_SUPPORTED=yes
fi

```

[Bug sanitizer/113430] [12/13 only] Trivial program segfaults intermittently with ASAN with large CONFIG_ARCH_MMAP_RND_BITS in kernel configuration

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

Andrew Pinski  changed:

   What|Removed |Added

Summary|Trivial program segfaults   |[12/13 only] Trivial
   |intermittently with ASAN|program segfaults
   |with large  |intermittently with ASAN
   |CONFIG_ARCH_MMAP_RND_BITS   |with large
   |in kernel configuration |CONFIG_ARCH_MMAP_RND_BITS
   ||in kernel configuration
   Target Milestone|--- |12.4

[Bug sanitizer/113430] Trivial program segfaults intermittently with ASAN with large CONFIG_ARCH_MMAP_RND_BITS in kernel configuration

2024-03-14 Thread dmjpp at hotmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113430

Dimitrij Mijoski  changed:

   What|Removed |Added

 CC||dmjpp at hotmail dot com

--- Comment #8 from Dimitrij Mijoski  ---
This bug manifested at large on Github Actions CI/CI system in the last few
days most likely because Ubuntu's kernel also got updated to use 32 random
bits. Here is the bug report
https://github.com/actions/runner-images/issues/9491 . It would be a good idea
to backport the fix.

[Bug testsuite/114343] [13 regression] many erratic errors starting with r13-8433-g1277f69b9b0206

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

Andrew Pinski  changed:

   What|Removed |Added

   Target Milestone|--- |13.3
   Assignee|dmalcolm at gcc dot gnu.org|unassigned at gcc dot 
gnu.org
  Component|analyzer|testsuite
   Severity|normal  |blocker

[Bug analyzer/114343] [13 regression] many erratic errors starting with r13-8433-g1277f69b9b0206

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

--- Comment #1 from Andrew Pinski  ---
No there is a missing `}` in the line that was done for
testsuite/gcc.dg/analyzer/null-deref-pr108251-smp_fetch_ssl_fc_has_early-O2.c :


/* { dg-bogus "may result in an unaligned pointer value" "Fixed in
r14-6517-gb7e4a4c626e" { xfail short_enums } */

There is a missing `}` in that comment.

[Bug analyzer/114343] New: [13 regression] many erratic errors starting with r13-8433-g1277f69b9b0206

2024-03-14 Thread seurer at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114343

Bug ID: 114343
   Summary: [13 regression] many erratic errors starting with
r13-8433-g1277f69b9b0206
   Product: gcc
   Version: 13.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: analyzer
  Assignee: dmalcolm at gcc dot gnu.org
  Reporter: seurer at gcc dot gnu.org
  Target Milestone: ---

g:1277f69b9b020688618bd034d3ceb03395e84326, r13-8433-g1277f69b9b0206

I am seeing many erratic errors starting with this revision.  Examples from two
different runs on the same revision:

FAIL: gcc.dg/20040622-2.c (test for excess errors)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 24)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 34)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 56)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 66)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 73)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 77)
FAIL: gcc.dg/cpp/defined.c  (test for errors, line 82)
FAIL: gcc.dg/cpp/include2.c  (test for errors, line 10)
FAIL: gcc.dg/cpp/include2.c (test for excess errors)
FAIL: gcc.dg/cpp/line2.c line # too high at line 13 (test for errors, line 2)
FAIL: gcc.dg/cpp/line2.c line # too low at line 12 (test for errors, line 1)
FAIL: gcc.dg/cpp/mac-dir-2.c  (test for errors, line 12)
FAIL: gcc.dg/cpp/multiline-2.c (test for excess errors)
FAIL: gcc.dg/cpp/skipping2.c (test for excess errors)
FAIL: gcc.dg/cpp/skipping2.c tokens after #endif (test for errors, line 13)
ERROR: tcl error sourcing
/home/seurer/gcc/git/gcc-13/gcc/testsuite/gcc.dg/analyzer/analyzer.exp.
ERROR: unmatched open brace in list


FAIL: gcc.dg/cpp/include2.c  (test for errors, line 10)
FAIL: gcc.dg/cpp/include2.c (test for excess errors)
FAIL: gcc.dg/cpp/include2a.c  (test for errors, line 10)
FAIL: gcc.dg/cpp/include2a.c (test for excess errors)
FAIL: gcc.dg/cpp/include2a.c missing at line 15 (test for errors, line )
FAIL: gcc.dg/cpp/multiline-2.c (test for excess errors)
FAIL: gcc.dg/tree-ssa/20030920-1.c (test for excess errors)
ERROR: tcl error sourcing
/home/seurer/gcc/git/gcc-13-test/gcc/testsuite/gcc.dg/analyzer/analyzer.exp.
ERROR: unmatched open brace in list


The errors are like this:

Excess errors:
/home/seurer/gcc/git/gcc-13-test/gcc/testsuite/gcc.dg/cpp/include2.c:10:18:
warning: extra tokens at end of #include directive

Line 10 has a comment after the #include:

#include >  /* { dg-error "extra tokens" } */

or maybe it is now mishandling the \>.

Excess errors:
/home/seurer/gcc/git/gcc-13-test/gcc/testsuite/gcc.dg/cpp/include2a.c:10:18:
warning: extra tokens at end of #include directive
/home/seurer/gcc/git/gcc-13-test/gcc/testsuite/gcc.dg/cpp/include2a.c:10:48:
warning: missing terminating " character


The specific ones that fail vary from run to run but that last ERROR one is
always there.

commit 1277f69b9b020688618bd034d3ceb03395e84326 (HEAD)
Author: Torbjrn SVENSSON 
Date:   Sat Mar 9 09:40:07 2024 +0100

testsuite: xfail test for short_enums

[Bug sanitizer/89323] Asan memory leak detection on x86 platform

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

Andrew Pinski  changed:

   What|Removed |Added

 Target||i?86
 Status|WAITING |NEW

--- Comment #6 from Andrew Pinski  ---
  x86_64-*-linux* | i?86-*-linux*)
if test x$ac_cv_sizeof_void_p = x8; then
TSAN_SUPPORTED=yes
LSAN_SUPPORTED=yes
TSAN_TARGET_DEPENDENT_OBJECTS=tsan_rtl_amd64.lo
HWASAN_SUPPORTED=yes
fi

RELLEB relocation format for ELF

2024-03-14 Thread Fangrui Song via Gcc
The relocation formats REL and RELA for ELF are inefficient. In a
release build of Clang for x86-64, .rela.* sections consume a
significant portion (approximately 20.9%) of the file size.

I propose RELLEB, a new format offering significant file size
reductions: 17.2% (x86-64), 16.5% (aarch64), and even 32.4% (riscv64)!

Your thoughts on RELLEB are welcome!

Detailed analysis:
https://maskray.me/blog/2024-03-09-a-compact-relocation-format-for-elf
generic ABI (ELF specification):
https://groups.google.com/g/generic-abi/c/yb0rjw56ORw
binutils feature request: https://sourceware.org/bugzilla/show_bug.cgi?id=31475
LLVM: 
https://discourse.llvm.org/t/rfc-relleb-a-compact-relocation-format-for-elf/77600

Implementation primarily involves binutils changes. Any volunteers?
For GCC, a driver option like -mrelleb in my Clang prototype would be
needed. The option instructs the assembler to use RELLEB.


[Bug target/113934] Switch avr to LRA

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

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Last reconfirmed||2024-03-15

--- Comment #3 from Andrew Pinski  ---
.

[Bug middle-end/59863] const array in function is placed on stack

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

Andrew Pinski  changed:

   What|Removed |Added

 CC||barry.revzin at gmail dot com

--- Comment #8 from Andrew Pinski  ---
*** Bug 99091 has been marked as a duplicate of this bug. ***

[Bug tree-optimization/99091] local array not prompted to static

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

Andrew Pinski  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #4 from Andrew Pinski  ---
Dup.

*** This bug has been marked as a duplicate of bug 59863 ***

[Bug target/95943] arc -mbig-endian "inappropriate arguments" error from assembler

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

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED
   Target Milestone|--- |11.0

--- Comment #1 from Andrew Pinski  ---
Fixed in GCC 11 by r11-5940-gf7ad4446274831 .

Results for 14.0.1 20240314 (experimental) [remotes/origin/HEAD r14-9484-gefab88888c1] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-03-14 Thread Bill Seurer (POWER9) via Gcc-testresults
 === gcc Summary ===

# of expected passes179063
# of unexpected failures132
# of unexpected successes   19
# of expected failures  1614
# of unsupported tests  4186
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xgcc  version 14.0.1 20240314 
(experimental) [remotes/origin/HEAD r14-9484-gefab8c1] (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
FAIL: gfortran.dg/ieee/large_2.f90   -O3 -g  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -Os  execution test

=== gfortran Summary ===

# of expected passes69444
# of unexpected failures12
# of unexpected successes   6
# of expected failures  285
# of unsupported tests  171
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/gfortran  version 14.0.1 
20240314 (experimental) [remotes/origin/HEAD r14-9484-gefab8c1] (GCC) 

=== g++ tests ===


Running target unix
FAIL: g++.dg/torture/pr104601.C   -O0  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O1  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O3 -g  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -Os  (test for excess errors)

=== g++ Summary ===

# of expected passes259128
# of unexpected failures7
# of expected failures  2623
# of unsupported tests  11622
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xg++  version 14.0.1 20240314 
(experimental) [remotes/origin/HEAD r14-9484-gefab8c1] (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 14.0.1 20240314 
(experimental) [remotes/origin/HEAD r14-9484-gefab8c1] (GCC) 

=== objc tests ===


Running target unix

=== objc Summary ===

# of expected passes2846
# of unsupported tests  70
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xgcc  version 14.0.1 20240314 
(experimental) [remotes/origin/HEAD r14-9484-gefab8c1] (GCC) 

=== libatomic tests ===


Running target unix

=== libatomic Summary ===

# of expected passes54
=== libgomp tests ===


Running target unix

=== libgomp Summary ===

# of expected passes16155
# of expected failures  285
# of unsupported tests  697
=== libitm tests ===


Running target unix

=== libitm Summary ===

# of expected passes44
# of expected failures  3
# of unsupported tests  1
=== libstdc++ tests ===


Running target unix

=== libstdc++ Summary ===

# of expected passes18539
# of expected failures  126
# of unsupported tests  740

Compiler version: 14.0.1 20240314 (experimental) [remotes/origin/HEAD 
r14-9484-gefab8c1] (GCC) 
Platform: powerpc64le-unknown-linux-gnu
configure flags: --prefix=/opt/gcc-nightly/trunk 
--enable-languages=c,c++,fortran,objc,obj-c++ --with-cpu=power9 
--enable-secureplt
fail   WARNING: Could not generate test framework tests
fail   WARNING: Could not generate test framework tests
fail   WARNING: Could not generate test framework t

[Bug target/111555] [AArch64] __ARM_FEATURE_UNALIGNED should be undefined with -mstrict-align

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

--- Comment #4 from Andrew Pinski  ---
(In reply to Andrew Pinski from comment #3)
> (In reply to YunQiang Su from comment #2)
> > For AArch64, clang supports `-mno-unaligned-access`, while gcc doesn't,
> > should we add it as an alias of -mstrict-align?
> 
> -mno-unaligned-access is the arm option here rather than the aarch64 option
> :).
> I suspect clang folks decided to have the same option for both targets. I
> don't think we should support -mno-unaligned-access for aarch64 GCC.

See PR 99890 where -mstrict-align was rejected for arm.

[Bug target/111555] [AArch64] __ARM_FEATURE_UNALIGNED should be undefined with -mstrict-align

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

--- Comment #3 from Andrew Pinski  ---
(In reply to YunQiang Su from comment #2)
> For AArch64, clang supports `-mno-unaligned-access`, while gcc doesn't,
> should we add it as an alias of -mstrict-align?

-mno-unaligned-access is the arm option here rather than the aarch64 option :).
I suspect clang folks decided to have the same option for both targets. I don't
think we should support -mno-unaligned-access for aarch64 GCC.

[Linaro-TCWG-CI] gcc-14-9478-gdf483ebd246: FAIL: 7 regressions on aarch64

2024-03-14 Thread ci_notify--- via Gcc-regression
Dear contributor, our automatic CI has detected problems related to your 
patch(es).  Please find some details below.  If you have any questions, please 
follow up on linaro-toolch...@lists.linaro.org mailing list, Libera's 
#linaro-tcwg channel, or ping your favourite Linaro toolchain developer on the 
usual project channel.

We appreciate that it might be difficult to find the necessary logs or 
reproduce the issue locally. If you can't get what you need from our CI within 
minutes, let us know and we will be happy to help.

We track this report status in https://linaro.atlassian.net/browse/GNU-1177 , 
please let us know if you are looking at the problem and/or when you have a fix.

In gcc_check master-aarch64 after:

  | commit gcc-14-9478-gdf483ebd246
  | Author: Jonathan Wakely 
  | Date:   Mon Feb 26 13:17:13 2024 +
  | 
  | libstdc++: Add nodiscard in 
  | 
  | Add the [[nodiscard]] attribute to several functions in .
  | These all have no side effects and are only called for their return
  | value (e.g. std::count) or produce a result that must not be discarded
  | for correctness (e.g. std::remove).
  | 
  | ... 49 lines of the commit log omitted.

FAIL: 7 regressions

regressions.sum:
=== g++ tests ===

Running g++:g++.dg/torture/dg-torture.exp ...
FAIL: g++.dg/torture/pr104601.C -O0  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C -O1  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C -O2  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C -O3 -g  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C -Os  (test for excess errors)
... and 1 more entries

You can find the failure logs in *.log.1.xz files in
 - 
https://ci.linaro.org/job/tcwg_gcc_check--master-aarch64-build/1715/artifact/artifacts/00-sumfiles/
The full lists of regressions and progressions as well as configure and make 
commands are in
 - 
https://ci.linaro.org/job/tcwg_gcc_check--master-aarch64-build/1715/artifact/artifacts/notify/
The list of [ignored] baseline and flaky failures are in
 - 
https://ci.linaro.org/job/tcwg_gcc_check--master-aarch64-build/1715/artifact/artifacts/sumfiles/xfails.xfail

The configuration of this build is:
CI config tcwg_gcc_check master-aarch64

-8<--8<--8<--
The information below can be used to reproduce a debug environment:

Current build   : 
https://ci.linaro.org/job/tcwg_gcc_check--master-aarch64-build/1715/artifact/artifacts
Reference build : 
https://ci.linaro.org/job/tcwg_gcc_check--master-aarch64-build/1714/artifact/artifacts

Reproduce last good and first bad builds: 
https://git-us.linaro.org/toolchain/ci/interesting-commits.git/plain/gcc/sha1/df483ebd24689a3bebfae2089637a00eca0e5a12/tcwg_gcc_check/master-aarch64/reproduction_instructions.txt

Full commit : 
https://github.com/gcc-mirror/gcc/commit/df483ebd24689a3bebfae2089637a00eca0e5a12

List of configurations that regressed due to this commit :
* tcwg_gcc_check
** master-aarch64
*** FAIL: 7 regressions
*** 
https://git-us.linaro.org/toolchain/ci/interesting-commits.git/plain/gcc/sha1/df483ebd24689a3bebfae2089637a00eca0e5a12/tcwg_gcc_check/master-aarch64/details.txt
*** 
https://ci.linaro.org/job/tcwg_gcc_check--master-aarch64-build/1715/artifact/artifacts


[Bug target/111555] [AArch64] __ARM_FEATURE_UNALIGNED should be undefined with -mstrict-align

2024-03-14 Thread syq at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111555

YunQiang Su  changed:

   What|Removed |Added

 CC||syq at gcc dot gnu.org

--- Comment #2 from YunQiang Su  ---
`-mno-unaligned-access` is also supported by MIPSr6.

I guess we should add a more generic macro for this case?
Is __UNALIGN_ACCESS_DISABLED__ OK?

For AArch64, clang supports `-mno-unaligned-access`, while gcc doesn't,
should we add it as an alias of -mstrict-align?

[Bug middle-end/114342] suboptimal codegen of vector::vector(range)

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

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
   Severity|normal  |enhancement
   Last reconfirmed||2024-03-14

--- Comment #2 from Andrew Pinski  ---
If you change `arr` to be: `static const int arr[]`. then GCC can do it with
only one memcpy.

So basically GCC does not know it remove arr from being a stack variable.

clang/LLVM is able to figure that out but it definitely requires inlining to do
that.

```
  arr = *.LC0;
...
  __builtin_memcpy (_21, , 444);
```

Basically GCC does not realize it can "remove" the local variable arr here.

Note there are duplicates of this bug report already too.

Results for 14.0.1 20240314 (experimental) [master r14-9481-g6cf4286ff94] (GCC) testsuite on s390x-ibm-linux-gnu default

2024-03-14 Thread stefansf--- via Gcc-testresults
quot;link_error"
FAIL: c-c++-common/tsan/tls_race.c   -O0  output pattern test
FAIL: c-c++-common/tsan/tls_race.c   -O2  output pattern test
FAIL: gcc.dg/vect/pr109011-4.c -flto -ffat-lto-objects  scan-tree-dump-times 
optimized " = .POPCOUNT (vect" 1
FAIL: gcc.dg/vect/pr109011-4.c scan-tree-dump-times optimized " = .POPCOUNT 
(vect" 1
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/s390/arch13/sel-1.c scan-assembler-times \\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/risbg-ll-2.c scan-assembler 
f10:\\n\\tsrlg\\t%r2,%r2,48\\n\\trosbg\\t%r2,%r3,32,39,0
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
XPASS: gcc.target/s390/vxe/popcount-1.c scan-assembler vpopctb\\t%v24,%v24
XPASS: gcc.target/s390/vxe/popcount-1.c scan-assembler vpopcth\\t%v24,%v24

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

# of expected passes180538
# of unexpected failures178
# of unexpected successes   19
# of expected failures  1467
# of unsupported tests  4229

=== gcc Summary ===

# of expected passes358001
# of unexpected failures386
# of unexpected successes   35
# of expected failures  2935
# of unsupported tests  9066
-default/gcc/xgcc  version 14.0.1 20240314 (experimental) [master 
r14-9481-g6cf4286ff94] (GCC) 

=== gdc tests ===


Running target unix/-m31
UNRESOLVED: gdc.test/runnable/literal.d   compilation failed to produce 
executable
UNRESOLVED: gdc.test/runnable/literal.d -shared-libphobos   compilation failed 
to produce executable
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.tes

[Bug middle-end/114342] suboptimal codegen of vector::vector(range)

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

--- Comment #1 from Andrew Pinski  ---
The first memcpy (rep movsq) is for:
```
  int arr[]{-5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10,
15, -5, 10, 15,-5, 10, 15 -5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5,
10, 15, -5, 10, 15, -5, 10,-5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5,
10, 15, -5, 10,-5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5,
10,-5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10,-5, 10,
15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10,};

```


The second memcpy is copying arr into the vector.
```
  _25 = operator new (444);

   [local count: 1073741824]:
  dd_2(D)->D.81462._M_impl.D.80768._M_start = _25;
  _16 = _25 + 444;
  dd_2(D)->D.81462._M_impl.D.80768._M_end_of_storage = _16;
  __builtin_memcpy (_25, , 444);
```

[Bug c++/114342] New: suboptimal codegen of vector::vector(range)

2024-03-14 Thread hiraditya at msn dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114342

Bug ID: 114342
   Summary: suboptimal codegen of vector::vector(range)
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: hiraditya at msn dot com
  Target Milestone: ---

#include
#include 

std::vector td() {
  int arr[]{-5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10,
15, -5, 10, 15,-5, 10, 15 -5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5,
10, 15, -5, 10, 15, -5, 10,-5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5,
10, 15, -5, 10,-5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5,
10,-5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10,-5, 10,
15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10, 15, -5, 10,};
  auto b = std::ranges::begin(arr);
  auto e = std::ranges::end(arr);
  std::vector dd(b, e);
  return dd;
}

What is the reason for calling `rep movsq` twice?

$ gcc -O3 -std=c++23
```
td():
pushrbp
mov esi, OFFSET FLAT:.LC0
mov ecx, 55
pxorxmm0, xmm0
pushrbx
mov rbx, rdi
sub rsp, 456
mov QWORD PTR [rbx+16], 0
mov rbp, rsp
movups  XMMWORD PTR [rbx], xmm0
mov rdi, rbp
rep movsq
mov eax, DWORD PTR [rsi]
mov DWORD PTR [rdi], eax
mov edi, 444
calloperator new(unsigned long)
lea rdx, [rax+444]
mov QWORD PTR [rbx], rax
lea rdi, [rax+8]
mov rsi, rbp
mov QWORD PTR [rbx+16], rdx
mov rcx, QWORD PTR [rsp]
and rdi, -8
mov QWORD PTR [rax], rcx
mov rcx, QWORD PTR [rsp+436]
mov QWORD PTR [rax+436], rcx
sub rax, rdi
sub rsi, rax
add eax, 444
shr eax, 3
mov ecx, eax
mov rax, rbx
rep movsq
mov QWORD PTR [rbx+8], rdx
add rsp, 456
pop rbx
pop rbp
ret
mov rbp, rax
jmp .L2
td() [clone .cold]:
.L2:
mov rdi, QWORD PTR [rbx]
mov rsi, QWORD PTR [rbx+16]
sub rsi, rdi
testrdi, rdi
je  .L3
calloperator delete(void*, unsigned long)
.L3:
mov rdi, rbp
call_Unwind_Resume
```

https://godbolt.org/z/5333db8Px

[Bug tree-optimization/114341] Optimization opportunity with {mul,div} "(x & -x)" and {<<,>>} "ctz(x)"

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

Andrew Pinski  changed:

   What|Removed |Added

   Last reconfirmed||2024-03-14
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Keywords||missed-optimization
 CC||pinskia at gcc dot gnu.org
   Severity|normal  |enhancement

--- Comment #2 from Andrew Pinski  ---
Confirmed for the multiply as I mentioned the divide is already recorded.

Results for 14.0.1 20240314 (experimental) [remotes/origin/HEAD r14-9484-gefab88888c] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-03-14 Thread Bill Seurer (POWER9 IEEE128) via Gcc-testresults
-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 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 17 sizeof (a) == 6
FAIL: gcc.dg/guality/vla-2.c   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  -DPREVENT_OPTIMIZATION line 25 sizeof (a) == 6 * sizeof 
(int)
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-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
FAIL: gcc.dg/tree-ssa/copy-headers-8.c scan-tree-dump-times ch2 "Conditional 
combines static and invariant" 1
FAIL: gcc.dg/tree-ssa/copy-headers-8.c scan-tree-dump-times ch2 "Will duplicate 
bb" 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 passes179063
# of unexpected failures116
# of unexpected successes   19
# of expected failures      1614
# of unsupported tests  4188
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xgcc  version 14.0.1 20240314 
(experimental) [remotes/origin/HEAD r14-9484-gefab8c] (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 -fin

[Bug tree-optimization/114341] Optimization opportunity with {mul,div} "(x & -x)" and {<<,>>} "ctz(x)"

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

--- Comment #1 from Andrew Pinski  ---
x/(y&-y) is already recorded as PR 97738 .

Results for 14.0.1 20240314 (experimental) [remotes/origin/HEAD r14-9483-g6dbf0d252f] (GCC) testsuite on powerpc64le-unknown-linux-gnu

2024-03-14 Thread Bill Seurer (POWER8) via Gcc-testresults
e-ssa/copy-headers-8.c scan-tree-dump-times ch2 "Will duplicate 
bb" 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/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 passes178055
# of unexpected failures148
# of unexpected successes   12
# of expected failures  1597
# of unsupported tests  4965
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xgcc  version 14.0.1 20240314 
(experimental) [remotes/origin/HEAD r14-9483-g6dbf0d252f] (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
FAIL: gfortran.dg/ieee/large_2.f90   -O3 -g  execution test
FAIL: gfortran.dg/ieee/large_2.f90   -Os  execution test

=== gfortran Summary ===

# of expected passes69442
# of unexpected failures12
# of unexpected successes   6
# of expected failures  285
# of unsupported tests  173
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/gfortran  version 14.0.1 
20240314 (experimental) [remotes/origin/HEAD r14-9483-g6dbf0d252f] (GCC) 

=== g++ tests ===


Running target unix
FAIL: g++.dg/modules/target-powerpc-1_a.C -std=c++17 (test for excess errors)
FAIL: g++.dg/modules/target-powerpc-1_a.C -std=c++2a (test for excess errors)
FAIL: g++.dg/modules/target-powerpc-1_a.C -std=c++2b (test for excess errors)
FAIL: g++.dg/modules/target-powerpc-1_b.C -std=c++17 (test for excess errors)
FAIL: g++.dg/modules/target-powerpc-1_b.C -std=c++2a (test for excess errors)
FAIL: g++.dg/modules/target-powerpc-1_b.C -std=c++2b (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O0  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O1  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2 -flto -fno-use-linker-plugin 
-flto-partition=none  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O2 -flto -fuse-linker-plugin 
-fno-fat-lto-objects  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -O3 -g  (test for excess errors)
FAIL: g++.dg/torture/pr104601.C   -Os  (test for excess errors)

=== g++ Summary ===

# of expected passes259116
# of unexpected failures13
# of expected failures  2623
# of unsupported tests  11628
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xg++  version 14.0.1 20240314 
(experimental) [remotes/origin/HEAD r14-9483-g6dbf0d252f] (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 14.0.1 20240314 
(experimental) [remotes/origin/HEAD r14-9483-g6dbf0d252f] (GCC) 

=== objc tests ===


Running target unix

=== objc Summary ===

# of expected passes2846
# of unsupported tests  70
/home/gccbuild/build/nightly/build-gcc-trunk/gcc/xgcc  version 14.0.1 20240314 
(experimental) [remotes/origin/HEAD r14-9483-g6dbf0d252f] (GCC) 

=== libatomic tests ===


Running target unix

=== libatomic Summary ===

# 

[Bug tree-optimization/114341] New: Optimization opportunity with {mul,div} "(x & -x)" and {<<,>>} "ctz(x)"

2024-03-14 Thread Explorer09 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114341

Bug ID: 114341
   Summary: Optimization opportunity with {mul,div} "(x & -x)" and
{<<,>>} "ctz(x)"
   Product: gcc
   Version: 13.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: Explorer09 at gmail dot com
  Target Milestone: ---

This is an optimization opportunity that I'm not sure it's worth
implementing in gcc, since I only used the (x / (x & -x)) pattern on
compile time constants only.

When x and y are unsigned integers and the value of y is non-zero,
then (x / (y & -y)) and (x >> __builtin_ctz(y)) are equivalent.

Similarly, (x * (y & -y)) and (x << __builtin_ctz(y)) are equivalent.

One reason for using the (x / (y & -y)) pattern is that it's more
portable among C compilers before C23 made a standard "CTZ" API
(stdc_trailing_zeros) for everyone. Even though we have
stdc_trailing_zeros() now, the (x / (y & -y)) pattern is still useful
for constant expressions when stdc_trailing_zeros() might not be a
compiler built in.

Processors that support CTZ instructions would optimize (x / (y & -y))
to (x >> __builtin_ctz(y)); processors that do not support CTZ would
optimize the other way around. (I know RISC-V might need the latter
way of optimization.)

```c
unsigned int func1a(unsigned int x, unsigned int y) {
  if (y == 0)
return -1; /* placeholder value to indicate error */

  return x / (y & -y);
}

unsigned int func1b(unsigned int x, unsigned int y) {
  if (y == 0)
return -1; /* placeholder value to indicate error */

  return x >> __builtin_ctz(y);
}

unsigned int func2a(unsigned int x, unsigned int y) {
  if (y == 0)
return -1; /* placeholder value to indicate error */

  return x * (y & -y);
}

unsigned int func2b(unsigned int x, unsigned int y) {
  if (y == 0)
return -1; /* placeholder value to indicate error */

  return x << __builtin_ctz(y);
}
```

  1   2   3   4   5   >