[Bug c/113817] ice in move_early_exit_stmts

2024-02-07 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113817

Sam James  changed:

   What|Removed |Added

 Resolution|--- |DUPLICATE
 CC||sjames at gcc dot gnu.org
 Status|UNCONFIRMED |RESOLVED

--- Comment #1 from Sam James  ---
Please try a fresh build.

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

[Bug tree-optimization/113731] [14 regression] ICE when building libbsd since r14-8768-g85094e2aa6dba7

2024-02-07 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113731

Sam James  changed:

   What|Removed |Added

 CC||dcb314 at hotmail dot com

--- Comment #13 from Sam James  ---
*** Bug 113817 has been marked as a duplicate of this bug. ***

[Bug c/113776] [14 regression] postgresql-16.1 build failure with -Werror=vla in configure test since r14-8641

2024-02-07 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113776

--- Comment #6 from Sam James  ---
Thank you!

[Bug middle-end/113734] [14 regression] libarchive miscompiled (fails libarchive_test_read_format_rar5_extra_field_version test) since r14-8768-g85094e2aa6dba7

2024-02-10 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113734

--- Comment #12 from Sam James  ---
Created attachment 57379
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57379&action=edit
test.c

Here's an initial stab at a standalone testcase. I'm going to try reduce it
now.

[Bug c++/113873] false warning about #pragma once

2024-02-11 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113873

Sam James  changed:

   What|Removed |Added

 CC||sjames at gcc dot gnu.org

--- Comment #1 from Sam James  ---
(In reply to Jadex Radex from comment #0)
> If you create an empty file with C/C++ extension and write "#pragma once",
> it will show warning "#pragma once in main file".
> 

What is "it" here? Is it "g++ foo.cxx', or is it 'g++ -c foo.cxx', or something
else?

[Bug c++/113746] [14 Regression] ICE: tree check: expected enumeral_type, have error_mark in tsubst_expr, at cp/pt.cc:21458 with missing typename since r14-4796-g3e3d73ed5e85e7

2024-02-11 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113746

Sam James  changed:

   What|Removed |Added

Summary|[14 Regression] ICE: tree   |[14 Regression] ICE: tree
   |check: expected |check: expected
   |enumeral_type, have |enumeral_type, have
   |error_mark in tsubst_expr,  |error_mark in tsubst_expr,
   |at cp/pt.cc:21458 with  |at cp/pt.cc:21458 with
   |missing typename|missing typename since
   ||r14-4796-g3e3d73ed5e85e7
 CC||ppalka at gcc dot gnu.org,
   ||sjames at gcc dot gnu.org
   Keywords|needs-bisection |

--- Comment #4 from Sam James  ---
(In reply to Filip Kastl from comment #3)

Filip, you seem to have commit access (apologies if I'm wrong). If so, you can
change your BZ email to @gcc.gnu.org and automatically
get permissions.

Anyway, doing that now.

[Bug c++/113746] [14 Regression] ICE: tree check: expected enumeral_type, have error_mark in tsubst_expr, at cp/pt.cc:21458 with missing typename since r14-4796-g3e3d73ed5e85e7

2024-02-11 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113746

--- Comment #5 from Sam James  ---
s/sourceware email/sourceware user/

[Bug middle-end/113734] [14 regression] libarchive miscompiled (fails libarchive_test_read_format_rar5_extra_field_version test) since r14-8768-g85094e2aa6dba7

2024-02-11 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113734

Sam James  changed:

   What|Removed |Added

  Attachment #57379|0   |1
is obsolete||

--- Comment #13 from Sam James  ---
Created attachment 57384
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57384&action=edit
test.c

Not done reducing yet but just posting an update.

[Bug middle-end/113734] [14 regression] libarchive miscompiled (fails libarchive_test_read_format_rar5_extra_field_version test) since r14-8768-g85094e2aa6dba7

2024-02-11 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113734

Sam James  changed:

   What|Removed |Added

  Attachment #57384|0   |1
is obsolete||

--- Comment #14 from Sam James  ---
Created attachment 57390
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57390&action=edit
test.c

I'll try reducing it preprocessed now (couldn't do it before as checking w/
clang as well in the reduction script to avoid introducing UB).

[Bug middle-end/113734] [14 regression] libarchive miscompiled (fails libarchive_test_read_format_rar5_extra_field_version test) since r14-8768-g85094e2aa6dba7

2024-02-12 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113734

Sam James  changed:

   What|Removed |Added

  Attachment #57390|0   |1
is obsolete||

--- Comment #16 from Sam James  ---
Created attachment 57393
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57393&action=edit
test.c

OK, all done now (I figured I'd let cvise finish). No more :)

By the way, this fails on arm64 too (at least the reduced thing).

[Bug tree-optimization/65424] gcc does not recognize byte swaps implemented as loop.

2024-02-12 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65424

Sam James  changed:

   What|Removed |Added

 CC||sjames at gcc dot gnu.org

--- Comment #6 from Sam James  ---
(In reply to Robert Clausecker from comment #4)
(You can change this in preferences.)

[Bug debug/92387] [11/12/13/14 regression] gcc generates wrong debug information at -O1 since r10-1907-ga20f263ba1a76a

2024-02-12 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92387

--- Comment #3 from Sam James  ---
With trunk, I get:
```
Breakpoint 1, main () at /tmp/foo.c:11
11  c ();
$1 = 
```

[Bug tree-optimization/113734] [14 regression] libarchive miscompiled (fails libarchive_test_read_format_rar5_extra_field_version test) since r14-8768-g85094e2aa6dba7

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113734

--- Comment #26 from Sam James  ---
I was using it in one of the testcases to compare with Clang earlier on as I
was suspicious of one of the functions being inlined to blame, just didn't
remove it later.

[Bug tree-optimization/113900] New: [14 regression] Hang and then ICe in vect_transform_loops, at tree-vectorizer.cc:1031 when building slang-2.3.3

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113900

Bug ID: 113900
   Summary: [14 regression] Hang and then ICe in
vect_transform_loops, at tree-vectorizer.cc:1031 when
building slang-2.3.3
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: compile-time-hog, ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: rguenth at gcc dot gnu.org
  Target Milestone: ---

Note that it takes ages to ICE which is also suspicious. Accordingly, I don't
know if I can reduce this.

```
# cd
/var/tmp/portage/sys-libs/slang-2.3.3-r1/work/slang-2.3.3-abi_x86_32.x86/src/elfobjs
&& x86_64-pc-linux-gnu-gcc -m32 -mfpmath=sse -c -O3 -pipe -march=native
-fdiagnostics-color=always -fpermissive -fno-strict-aliasing -Waddress
-Warray-bounds -Wfree-nonheap-object -Wint-to-pointer-cast -Wmain -Wnonnull
-Wodr -Wreturn-type -Wsizeof-pointer-memaccess -Wstrict-aliasing
-Wstring-compare -Wuninitialized -Wvarargs   -fPIC  -Dunix -DSLANG  
/var/tmp/portage/sys-libs/slang-2.3.3-r1/work/slang-2.3.3-abi_x86_32.x86/src/slarith.c

during GIMPLE pass: vect
/var/tmp/portage/sys-libs/slang-2.3.3-r1/work/slang-2.3.3-abi_x86_32.x86/src/slarith.c:
In function ‘_pSLarith_register_types’:
/var/tmp/portage/sys-libs/slang-2.3.3-r1/work/slang-2.3.3-abi_x86_32.x86/src/slarith.c:1539:5:
internal compiler error: in vect_transform_loops, at tree-vectorizer.cc:1031
 1539 | int _pSLarith_register_types (void)
  | ^~~~
0x55ff49e7df8a vect_transform_loops
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-vectorizer.cc:1031
0x55ff4b533b51 try_vectorize_loop_1
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-vectorizer.cc:1152
0x55ff4b533b51 try_vectorize_loop
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-vectorizer.cc:1182
0x55ff4b24d256 execute
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-vectorizer.cc:1298
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
```

[Bug tree-optimization/113900] [14 regression] Hang and then ICe in vect_transform_loops, at tree-vectorizer.cc:1031 when building slang-2.3.3

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113900

--- Comment #1 from Sam James  ---
Created attachment 57405
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57405&action=edit
slarith.i.xz

[Bug tree-optimization/113900] [14 regression] Hang and then ICE in vect_transform_loops, at tree-vectorizer.cc:1031 when building slang-2.3.3

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113900

--- Comment #2 from Sam James  ---
This actually takes ages even when it doesn't ICE:
```
$ gcc -c ./slarith.i -O2 -ftime-report
Time variable   usr   sys  wall
  GGC
 phase setup:   0.00 (  0%)   0.00 (  0%)   0.01 (  0%)
 1841k (  0%)
 phase parsing  :   0.47 (  1%)   0.41 ( 37%)   0.88 (  2%)
   24M (  4%)
 phase opt and generate :  33.91 ( 99%)   0.70 ( 63%)  34.61 ( 97%)
  633M ( 96%)
 garbage collection :   0.53 (  2%)   0.01 (  1%)   0.54 (  2%)
0  (  0%)
 dump files :   0.06 (  0%)   0.00 (  0%)   0.06 (  0%)
0  (  0%)
 callgraph construction :   0.02 (  0%)   0.00 (  0%)   0.05 (  0%)
 8742k (  1%)
 callgraph optimization :   0.05 (  0%)   0.00 (  0%)   0.06 (  0%)
 2200  (  0%)
 callgraph functions expansion  :  28.02 ( 82%)   0.45 ( 41%)  28.47 ( 80%)
  500M ( 76%)
 callgraph ipa passes   :   5.47 ( 16%)   0.21 ( 19%)   5.68 ( 16%)
   70M ( 11%)
 ipa function summary   :   0.34 (  1%)   0.00 (  0%)   0.37 (  1%)
   14M (  2%)
 ipa devirtualization   :   0.00 (  0%)   0.00 (  0%)   0.01 (  0%)
0  (  0%)
 ipa cp :   0.01 (  0%)   0.00 (  0%)   0.01 (  0%)
  151k (  0%)
 ipa inlining heuristics:   0.01 (  0%)   0.00 (  0%)   0.00 (  0%)
   48k (  0%)
 ipa function splitting :   0.00 (  0%)   0.00 (  0%)   0.02 (  0%)
 9192  (  0%)
 ipa reference  :   0.00 (  0%)   0.00 (  0%)   0.01 (  0%)
0  (  0%)
 ipa profile:   0.00 (  0%)   0.00 (  0%)   0.01 (  0%)
0  (  0%)
 ipa pure const :   0.03 (  0%)   0.00 (  0%)   0.05 (  0%)
 3792  (  0%)
 ipa icf:   0.03 (  0%)   0.00 (  0%)   0.03 (  0%)
   48k (  0%)
 ipa SRA:   0.02 (  0%)   0.00 (  0%)   0.01 (  0%)
   37k (  0%)
 ipa free inline summary:   0.01 (  0%)   0.00 (  0%)   0.00 (  0%)
0  (  0%)
 ipa modref :   0.04 (  0%)   0.00 (  0%)   0.05 (  0%)
  459k (  0%)
 cfg construction   :   0.00 (  0%)   0.00 (  0%)   0.01 (  0%)
 2113k (  0%)
 cfg cleanup:   0.19 (  1%)   0.00 (  0%)   0.21 (  1%)
 4518k (  1%)
 CFG verifier   :   0.90 (  3%)   0.04 (  4%)   0.82 (  2%)
0  (  0%)
 trivially dead code:   0.02 (  0%)   0.00 (  0%)   0.03 (  0%)
0  (  0%)
 df scan insns  :   0.05 (  0%)   0.00 (  0%)   0.01 (  0%)
   12k (  0%)
 df reaching defs   :   0.19 (  1%)   0.00 (  0%)   0.20 (  1%)
0  (  0%)
 df live regs   :   0.40 (  1%)   0.01 (  1%)   0.39 (  1%)
0  (  0%)
 df live&initialized regs   :   0.17 (  0%)   0.00 (  0%)   0.19 (  1%)
0  (  0%)
 df must-initialized regs   :   0.00 (  0%)   0.00 (  0%)   0.01 (  0%)
0  (  0%)
 df use-def / def-use chains:   0.08 (  0%)   0.00 (  0%)   0.10 (  0%)
0  (  0%)
 df reg dead/unused notes   :   0.17 (  0%)   0.01 (  1%)   0.15 (  0%)
 3314k (  0%)
 register information   :   0.04 (  0%)   0.01 (  1%)   0.01 (  0%)
0  (  0%)
 alias analysis :   0.08 (  0%)   0.00 (  0%)   0.12 (  0%)
   14M (  2%)
 alias stmt walking :   0.15 (  0%)   0.02 (  2%)   0.24 (  1%)
  227k (  0%)
 register scan  :   0.03 (  0%)   0.00 (  0%)   0.01 (  0%)
  154k (  0%)
 rebuild jump labels:   0.02 (  0%)   0.00 (  0%)   0.02 (  0%)
  768  (  0%)
 preprocessing  :   0.10 (  0%)   0.11 ( 10%)   0.19 (  1%)
  500k (  0%)
 lexical analysis   :   0.12 (  0%)   0.14 ( 13%)   0.36 (  1%)
0  (  0%)
 parser (global):   0.02 (  0%)   0.01 (  1%)   0.03 (  0%)
 3270k (  0%)
 parser function body   :   0.19 (  1%)   0.14 ( 13%)   0.28 (  1%)
   20M (  3%)
 early inlining heuristics  :   0.01 (  0%)   0.00 (  0%)   0.00 (  0%)
   23k (  0%)
 inline parameters  :   0.11 (  0%)   0.00 (  0%)   0.12 (  0%)
  801k (  0%)
 tree gimplify  :   0.12 (  0%)   0.01 (  1%)   0.12 (  0%)
   30M (  5%)
 tree CFG construction  :   0.06 (  0%)   0.01 (  1%)   0.06 (  0%)
   22M (  3%)
 tree CFG cleanup   :   0.36 (  1%)   0.00 (  0%)   0.24 (  1%)
  320k (  0%)
 tree tail merge:   0.02 (  0%)   0.00 (  0%)   0.04 (  0%)
 3392k (  1%)
 tree VRP   :   1.51 (  4%)   0.01 (  1%)   1.60 (  5%)
   20M (  3%)
 tree Early VRP :   0.78 (  2%)   0.02 (  2%)   0.84 (  2%)
   11M (  2%)
 tree copy propagation  :   0.10 (  0%)   0.00 (  0%)   0.05 (  0%)
  353k (  0%)
 tree PTA  

[Bug tree-optimization/113900] [14 regression] Hang and then ICE in vect_transform_loops, at tree-vectorizer.cc:1031 when building slang-2.3.3

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113900

--- Comment #3 from Sam James  ---
OK, it takes ages (at least with checking, can't check without right now) with
10/11/12/13/14, so that part isn't a regression. Weird how I didn't notice
before.

[Bug tree-optimization/113901] New: [14 regression] ICE when building nodejs-20.11.0 (crash in find_uses_to_rename_use)

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113901

Bug ID: 113901
   Summary: [14 regression] ICE when building nodejs-20.11.0
(crash in find_uses_to_rename_use)
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57406
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57406&action=edit
v8_base_without_compiler.regexp-compiler.ii.xz

```
FAILED: obj/deps/v8/src/regexp/v8_base_without_compiler.regexp-compiler.o
x86_64-pc-linux-gnu-g++ -MMD -MF
obj/deps/v8/src/regexp/v8_base_without_compiler.regexp-compiler.o.d
-D_GLIBCXX_USE_CXX11_ABI=1 -DNODE_OPENSSL_CONF_NAME=nodejs_conf
-DNODE_OPENSSL_CERT_STORE -DICU_NO_USER_DATA_OVERRIDE -DV8_GYP_BUILD
-DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=64 -D__STDC_FORMAT_MACROS
-DV8_TARGET_ARCH_X64 -DV8_HAVE_TARGET_OS -DV8_TARGET_OS_LINUX
'-DV8_EMBEDDER_STRING="-node.17"' -DENABLE_DISASSEMBLER
-DV8_PROMISE_INTERNAL_FIELD_COUNT=1
-DV8_ENABLE_PRIVATE_MAPPING_FORK_OPTIMIZATION -DV8_SHORT_BUILTIN_CALLS
-DOBJECT_PRINT -DV8_INTL_SUPPORT -DV8_ATOMIC_OBJECT_FIELD_WRITES
-DV8_ENABLE_LAZY_SOURCE_POSITIONS -DV8_USE_SIPHASH -DV8_SHARED_RO_HEAP
-DV8_WIN64_UNWINDING_INFO -DV8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH
-DV8_USE_ZLIB -DV8_ENABLE_TURBOFAN -DV8_ENABLE_WEBASSEMBLY
-DV8_ENABLE_JAVASCRIPT_PROMISE_HOOKS -DV8_ALLOCATION_FOLDING
-DV8_ALLOCATION_SITE_TRACKING -DV8_ADVANCED_BIGINT_ALGORITHMS
-DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC -I../../deps/v8
-I../../deps/v8/include -Igen/inspector-generated-output-root
-I../../deps/v8/third_party/inspector_protocol -Igen
-Igen/generate-bytecode-output-root -I../../deps/v8/third_party/zlib
-I../../deps/v8/third_party/zlib/google -pthread -Wno-unused-parameter
-Wno-return-type -fno-strict-aliasing -m64 -m64 -fno-omit-frame-pointer
-fdata-sections -ffunction-sections -O3 -O3 -pipe -march=native
-fdiagnostics-color=always -fno-rtti -fno-exceptions -std=gnu++17  -c
../../deps/v8/src/regexp/regexp-compiler.cc -o
obj/deps/v8/src/regexp/v8_base_without_compiler.regexp-compiler.o
during GIMPLE pass: vect
../../deps/v8/src/regexp/regexp-compiler.cc: In function ‘int
v8::internal::{anonymous}::GetCaseIndependentLetters(v8::internal::Isolate*,
v8::base::uc16, bool, unibrow::uchar*, int)’:
../../deps/v8/src/regexp/regexp-compiler.cc:753:5: internal compiler error:
Segmentation fault
  753 | int GetCaseIndependentLetters(Isolate* isolate, base::uc16 character,
  | ^
0x55dd0a0957ec crash_signal
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/toplev.cc:317
0x55dd0ae5bd3f find_uses_to_rename_use
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-loop-manip.cc:414
0x55dd0ae5bd3f find_uses_to_rename_bb(basic_block_def*, bitmap_head**,
bitmap_head*, int) [clone .constprop.0]
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-loop-manip.cc:489
0x55dd0acbff2d find_uses_to_rename
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-loop-manip.cc:521
0x55dd0acbff2d rewrite_into_loop_closed_ssa_1
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-loop-manip.cc:588
0x55dd0acbff2d rewrite_into_loop_closed_ssa(bitmap_head*, unsigned int)
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-loop-manip.cc:628
0x55dd0b0030e7 execute
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-vectorizer.cc:1360
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
```

'g++ -c v8_base_without_compiler.regexp-compiler.ii -march=znver2 -O3' is
enough.

```
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/14/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-14.0./work/gcc-14.0./configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/14
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/14/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=yes,extra,rtl,df
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 14.0. p,

[Bug tree-optimization/113901] [14 regression] ICE when building nodejs-20.11.0 (crash in find_uses_to_rename_use)

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113901

--- Comment #1 from Sam James  ---
```
# g++ -c v8_base_without_compiler.regexp-compiler.ii -march=znver2 -O3 -wrapper
valgrind
==21117== Memcheck, a memory error detector
==21117== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==21117== Using Valgrind-3.22.0 and LibVEX; rerun with -h for copyright info
==21117== Command: /usr/libexec/gcc/x86_64-pc-linux-gnu/14/cc1plus
-fpreprocessed v8_base_without_compiler.regexp-compiler.ii -quiet -dumpbase
v8_base_without_compiler.regexp-compiler.ii -dumpbase-ext .ii -march=znver2 -O3
-o /tmp/ccmEFFzy.s
==21117==
==21117== Conditional jump or move depends on uninitialised value(s)
==21117==at 0x25A1A67: UnknownInlinedFun (sparseset.h:146)
==21117==by 0x25A1A67: mark_pseudo_regno_live(int) [clone .lto_priv.0]
(ira-lives.cc:327)
==21117==by 0x2597D96: UnknownInlinedFun (ira-lives.cc:411)
==21117==by 0x2597D96: UnknownInlinedFun (ira-lives.cc:425)
==21117==by 0x2597D96: process_bb_node_lives(ira_loop_tree_node*)
(ira-lives.cc:1518)
==21117==by 0x2577B6C: ira_traverse_loop_tree(bool, ira_loop_tree_node*,
void (*)(ira_loop_tree_node*), void (*)(ira_loop_tree_node*))
(ira-build.cc:1809)
==21117==by 0x29487B8: ira_create_allocno_live_ranges() (ira-lives.cc:1818)
==21117==by 0x257135C: ira_build() (ira-build.cc:3491)
==21117==by 0x292E234: UnknownInlinedFun (ira.cc:5793)
==21117==by 0x292E234: (anonymous namespace)::pass_ira::execute(function*)
[clone .lto_priv.0] (ira.cc:6117)
==21117==by 0x203FD75: execute_one_pass(opt_pass*) (passes.cc:2646)
==21117==by 0x20F336B: execute_pass_list_1(opt_pass*) (passes.cc:2755)
==21117==by 0x20F3388: execute_pass_list_1(opt_pass*) (passes.cc:2756)
==21117==by 0x20F3028: execute_pass_list(function*, opt_pass*)
(passes.cc:2766)
==21117==by 0x2850A23: cgraph_node::expand() (cgraphunit.cc:1843)
==21117==by 0x2039673: UnknownInlinedFun (cgraphunit.cc:2026)
==21117==by 0x2039673: symbol_table::compile() (cgraphunit.cc:2400)
[...]
```

I'll reduce it now.

[Bug tree-optimization/113901] [14 regression] ICE when building nodejs-20.11.0 (crash in find_uses_to_rename_use)

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113901

Sam James  changed:

   What|Removed |Added

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

--- Comment #2 from Sam James  ---
PR113902 may be a dupe of this but it has a way smaller testcase.

[Bug tree-optimization/113900] [14 regression] Hang and then ICE in vect_transform_loops, at tree-vectorizer.cc:1031 when building slang-2.3.3

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113900

--- Comment #4 from Sam James  ---
I'll bisect and then also try reduce if it has tolerable speed without
checking.

[Bug middle-end/113907] New: [14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113907

Bug ID: 113907
   Summary: [14 regression] ICU miscompiled since on x86 since
r14-5109-ga291237b628f41
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: amacleod at redhat dot com, arsen at gcc dot gnu.org
  Target Milestone: ---

Originally reported downstream in Gentoo at https://bugs.gentoo.org/924153.

ICU seems miscompiled on x86 (-m32) since r14-5109-ga291237b628f41. My C++ is
~non-existent so I can't reduce it. I appreciate this isn't a great level of
detail.

It crashes during the build when running a just-built executable:
```
i686-pc-linux-gnu-g++ -D_REENTRANT -DU_DEBUG=1 -DU_HAVE_ELF_H=1
-DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=0 -DU_DISABLE_RENAMING=1
-I/var/tmp/portage/dev-libs/icu-74.2/work/icu/source/common
-I/var/tmp/portage/dev-libs/icu-74.2/work/icu/source/tools/icupkg/../toolutil
-DU_ATTRIBUTE_DEPRECATED= -O2 -march=i686 -pipe -pipe -frecord-gcc-switches
-fno-diagnostics-color -fmessage-length=0 -std=c++14 -W -Wall -pedantic
-Wpointer-arith -Wwrite-strings -Wno-long-long -c -o icupkg.o
/var/tmp/portage/dev-libs/icu-74.2/work/icu/source/tools/icupkg/icupkg.cpp
[..]
i686-pc-linux-gnu-g++ -O2 -march=i686 -pipe -pipe -frecord-gcc-switches
-fno-diagnostics-color -fmessage-length=0 -std=c++14 -W -Wall -pedantic
-Wpointer-arith -Wwrite-strings -Wno-long-long   -Wl,-O1 -Wl,--as-needed
-Wl,--defsym=__gentoo_check_ldflags__=0   -o ../../bin/icupkg icupkg.o
-L../../lib -licutu -L../../lib -licui18n -L../../lib -licuuc -L../../stubdata
-licudata -lpthread -lm  
[...]
Unpacking
/var/tmp/portage/dev-libs/icu-74.2/work/icu/source/data/in/icudt74l.dat and
generating out/tmp/icudata.lst (list of data files)
LD_LIBRARY_PATH=../lib:../stubdata:../tools/ctestfw:$LD_LIBRARY_PATH 
../bin/icupkg -d ./out/build/icudt74l --list -x \*
/var/tmp/portage/dev-libs/icu-74.2/work/icu/source/data/in/icudt74l.dat -o
out/tmp/icudata.lst
make[1]: *** [Makefile:272: out/tmp/icudata.lst] Segmentation fault
make[1]: *** Waiting for unfinished jobs
make[2]: Leaving directory
'/var/tmp/portage/dev-libs/icu-74.2/work/icu/source-abi_x86_32.x86/data'
make[1]: Leaving directory
'/var/tmp/portage/dev-libs/icu-74.2/work/icu/source-abi_x86_32.x86/data'
make: *** [Makefile:153: all-recursive] Error 2
 * ERROR: dev-libs/icu-74.2::gentoo failed (compile phase):
 *   emake failed
```

Valgrind says:
```
==26485== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==26485== Using Valgrind-3.22.0 and LibVEX; rerun with -h for copyright info
==26485== Command: ../bin/icupkg -d ./out/build/icudt74l --list -x *
/var/tmp/portage/dev-libs/icu-74.1/work/icu/source/data/in/icudt74l.dat -o
out/tmp/icudata.lst
==26485==
==26485== Invalid write of size 1
==26485==at 0x52A0110: memcpy (string_fortified.h:29)
==26485==by 0x52A0110: uprv_copyArray64 (udataswp.cpp:172)
==26485==by 0x52A0110: uprv_copyArray16(UDataSwapper const*, void const*,
int, void*, UErrorCode*) (udataswp.cpp:160)
==26485==by 0x52A0630: udata_swapDataHeader (udataswp.cpp:342)
==26485==by 0x48694F1: icu::Package::readPackage(char const*)
(package.cpp:483)
==26485==by 0x10987F: main (icupkg.cpp:335)
==26485==  Address 0x54f2458 is 0 bytes after a block of size 201,216 alloc'd
==26485==at 0x4842E4D: operator new(unsigned int) (vg_replace_malloc.c:476)
==26485==by 0x10936B: main (icupkg.cpp:285)
```

Manual reproduction steps:
```
./configure CC="gcc -m32" CXX="g++ -m32" CFLAGS="-O2 -ggdb3 -march=i686"
CXXFLAGS="-O2 -ggdb3 -march=i686" --disable-renaming --disable-layoutex
--disable-samples
make -j$(nproc)
```

There's some suspicious code there wrt reinterpret_cast but
-fno-strict-aliasing doesn't help. It's fine with -O1, but not -O2.

[Bug middle-end/113907] [14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113907

--- Comment #1 from Sam James  ---
I will do the usual bisection of objects and also narrow it down with pragmas.
I won't be able to get much further than that though, I suspect.

-fsanitize=address,undefined builds fine (i.e. it doesn't even segfault).

[Bug middle-end/113907] [14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113907

--- Comment #2 from Sam James  ---
Program received signal SIGSEGV, Segmentation fault.
0xf770e5c0 in memcpy (__dest=, __src=,
__len=) at /usr/include/bits/string_fortified.h:29
29return __builtin___memcpy_chk (__dest, __src, __len,
(gdb) bt
#0  0xf770e5c0 in memcpy (__dest=, __src=,
__len=) at /usr/include/bits/string_fortified.h:29
#1  uprv_copyArray64 (ds=, pErrorCode=,
inData=, length=, outData=0xf7f21094) at
udataswp.cpp:172
#2  uprv_copyArray16 (ds=, inData=,
length=, outData=, pErrorCode=) at
udataswp.cpp:160
#3  0xf770eac5 in udata_swapDataHeader (ds=, inData=, length=, outData=, pErrorCode=) at udataswp.cpp:342
#4  0xf7f65cb2 in icu::Package::readPackage (this=this@entry=0xf7f21010,
filename=filename@entry=0xcc82 "./in/icudt74l.dat") at package.cpp:483
#5  0x56556850 in main (argc=2, argv=0xca14) at icupkg.cpp:335
(gdb)

[Bug middle-end/113907] [14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113907

--- Comment #4 from Sam James  ---
Created attachment 57409
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57409&action=edit
udataswp.ii.xz

It goes wrong in common/udataswp.cpp's uprv_copyArray16 and uprv_copyArray64.

(Seemingly both of them need to be pragma'd but I'll check again later as it's
a bit weird.)

The first differing pass is 262r.expand.

```
[...]
-(insn # # # (set (reg:CC 17 flags)
-(compare:CC (reg:SI 133)
-(const_int 8 [0x8]))) "udataswp.cpp":173:9#
- (nil))
-
-(jump_insn # # # (set (pc)
-(if_then_else (ltu (reg:CC 17 flags)
-(const_int 0 [0]))
-(label_ref #)
-(pc))) "udataswp.cpp":173:9#
- (int_list:REG_BR_PROB 644245100 (nil)))
[...]
@@ -6876,15 +6862,11 @@ Merged 2 and 3 without moving.
 Edge 7->9 redirected to 10
 Forwarding edge 8->9 to 10 failed.
 Deleted label in block 9.
-Redirecting jump 51 from 24 to 25.
-Edge 19->21 redirected to 22
-Merging block 21 into block 20...
-Merged blocks 20 and 21.
-Merged 20 and 21 without moving.
-Merging block 24 into block 23...
-Merged blocks 23 and 24.
-Merged 23 and 24 without moving.
-Removing jump 128.
+Redirecting jump 51 from 22 to 23.
+Merging block 22 into block 21...
+Merged blocks 21 and 22.
+Merged 21 and 22 without moving.
+Removing jump 123.
[...]
```

[Bug middle-end/113907] [14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113907

--- Comment #5 from Sam James  ---
Created attachment 57410
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57410&action=edit
udataswp.cpp.262r.expand (good)

[Bug middle-end/113907] [14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113907

--- Comment #6 from Sam James  ---
Created attachment 57411
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57411&action=edit
udataswp.cpp.262r.expand (bad)

[Bug middle-end/113907] [14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113907

--- Comment #7 from Sam James  ---
Created attachment 57412
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57412&action=edit
udataswp.o (good, r14-5108-g751fc7bcdcdf25)

[Bug middle-end/113907] [14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113907

--- Comment #8 from Sam James  ---
Created attachment 57413
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57413&action=edit
udataswp.o (bad, r14-5109-ga291237b628f41)

[Bug middle-end/113907] [14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113907

--- Comment #9 from Sam James  ---
(In reply to Sam James from comment #4)
> Created attachment 57409 [details]
> udataswp.ii.xz
> 
> It goes wrong in common/udataswp.cpp's uprv_copyArray16 and uprv_copyArray64.
> 

ah, uprv_copyArray64 -> uprv_copyArray16 as the memcpy impl

[Bug middle-end/113907] [14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113907

--- Comment #12 from Sam James  ---
-O2 -march=i686 -std=c++11 -m32 -fPIC

[Bug middle-end/113907] [14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113907

--- Comment #13 from Sam James  ---
(In reply to Andrew Pinski from comment #11)
> Does -fwrapv help?

no (and ubsan suppresses the crash, everything works fine w/ no ubsan output)

[Bug middle-end/113907] [14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113907

--- Comment #16 from Sam James  ---
(In reply to Jakub Jelinek from comment #14
> So it certainly doesn't surprise me some length < 8 check is optimized away
> given the above range info.  The question is if it is correct and what
> values the length actually get at runtime if you e.g. compile with -O0.

(gdb) b uprv_copyArray16
Breakpoint 1 at 0xf770e71b: file udataswp.cpp, line 147.
(gdb) b uprv_copyArray64
Breakpoint 2 at 0xf770e7ba: file udataswp.cpp, line 164.
(gdb) r

Breakpoint 1, uprv_copyArray16 (ds=0x5655e4f0, inData=0xf32a4010, length=2,
outData=0xf7f24094, pErrorCode=0xc47c) at udataswp.cpp:147
147 if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {
(gdb) c
Continuing.

Breakpoint 1, uprv_copyArray16 (ds=0x5655e4f0, inData=0xf32a4014, length=4,
outData=0xf7f24098, pErrorCode=0xc47c) at udataswp.cpp:147
147 if(pErrorCode==nullptr || U_FAILURE(*pErrorCode)) {

(gdb) c
Continuing.
[Inferior 1 (process 2861598) exited normally]
(gdb)

Oops.

[Bug target/113915] New: [14 regression] glibc miscompiled for armv7a since r14-4365-g0731889c026bfe

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113915

Bug ID: 113915
   Summary: [14 regression] glibc miscompiled for armv7a since
r14-4365-g0731889c026bfe
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: wrong-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: ramana at gcc dot gnu.org, wilco at gcc dot gnu.org
  Target Milestone: ---

glibc seems to go from 30 failing innocent tests (*) to over 400 between gcc-13
and gcc-14. Bisected to r14-4365-g0731889c026bfe which fixed PR111235.

It's hard to know where to start with this. I'll try the usual bisection of
objects and then pragmas although I fear the (necessary) complexities of
glibc's build system may make my usual method tricky. We'll see...

I've bisected using glibc's posix/tst-getopt-cancel test as it had easy output
to grep for:
```
$ cat ./posix/tst-getopt-cancel.out
begin: no errors
Didn't expect signal from child: got `Segmentation fault'
```

(*) just from sandboxing stuff, they're normally not there and should be
unrelated given they happened w/ 13.

[Bug target/113915] [14 regression] glibc miscompiled for armv7a since r14-4365-g0731889c026bfe

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113915

--- Comment #1 from Sam James  ---
glibc's WAIT_FOR_DEBUGGER support for tests seems broken, as it drops me into a
waiting process with:
```
/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/posix/tst-getopt-cancel.gdb:6:
Error in sourced command file:
'wait_for_debugger' has unknown type; cast it to its declared type
```

Can't manually set wait_for_debugger either. Whatever. Trying manually, we get
(without very good debugging symbols yet):
```
Thread 2.1 "ld-linux-armhf." received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xf7e33020 (LWP 4162410)]
0xf7fcc524 in _dl_find_object_update () from
/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/elf/ld-linux-armhf.so.3
(gdb) bt
#0  0xf7fcc524 in _dl_find_object_update () from
/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/elf/ld-linux-armhf.so.3
#1  0xf7fd4320 in dl_open_worker_begin () from
/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/elf/ld-linux-armhf.so.3
#2  0xf7fc8f68 in _dl_catch_exception () from
/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/elf/ld-linux-armhf.so.3
#3  0xf7fd37c4 in dl_open_worker () from
/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/elf/ld-linux-armhf.so.3
#4  0xf7fc8f68 in _dl_catch_exception () from
/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/elf/ld-linux-armhf.so.3
#5  0xf7fd3b94 in _dl_open () from
/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/elf/ld-linux-armhf.so.3
#6  0xf7f80528 in do_dlopen () from
/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/libc.so.6
#7  0xf7fc8f68 in _dl_catch_exception () from
/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/elf/ld-linux-armhf.so.3
#8  0xf7fc90c4 in _dl_catch_error () from
/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/elf/ld-linux-armhf.so.3
#9  0xf7f8044c in dlerror_run () from
/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/libc.so.6
#10 0xf7f80744 in __libc_dlopen_mode () from
/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/libc.so.6
#11 0xf7f3601c in __libc_unwind_link_get () from
/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/libc.so.6
#12 0xf7eb21a0 in pthread_cancel@GLIBC_2.4 () from
/var/tmp/portage/sys-libs/glibc-2.38-r10/work/build-arm-armv7a-unknown-linux-gnueabihf-nptl/libc.so.6
#13 0xf7fc2828 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
```

[Bug target/113915] [14 regression] glibc miscompiled for armv7a since r14-4365-g0731889c026bfe

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113915

Sam James  changed:

   What|Removed |Added

   See Also||https://sourceware.org/bugz
   ||illa/show_bug.cgi?id=28745
 CC||fw at gcc dot gnu.org

--- Comment #2 from Sam James  ---
_dl_find_object_update uses a bunch of atomics so the bisect result seems
reasonable. It is possible that there's something wrong on the glibc side here,
like in https://sourceware.org/bugzilla/show_bug.cgi?id=28745.

[Bug target/113915] [14 regression] glibc miscompiled for armv7a since r14-4365-g0731889c026bfe

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113915

--- Comment #3 from Sam James  ---
On glibc trunk (491e55beab7457ed310a4a47496f4a333c5d1032), I can reproduce
with:
```
CC=/tmp/gcc/bin/gcc CXX=/tmp/gcc/bin/g++ ~/git/glibc/configure --prefix=/usr
make -j$(nproc)
make test t=posix/tst-getopt-cancel
```

```
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/armv7a-unknown-linux-gnueabihf/14/lto-wrapper
Target: armv7a-unknown-linux-gnueabihf
Configured with:
/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240204-r1/work/gcc-14-20240204/configure
--host=armv7a-unknown-linux-gnueabihf --build=armv7a-unknown-linux-gnueabihf
--prefix=/usr --bindir=/usr/armv7a-unknown-linux-gnueabihf/gcc-bin/14
--includedir=/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/14/include
--datadir=/usr/share/gcc-data/armv7a-unknown-linux-gnueabihf/14
--mandir=/usr/share/gcc-data/armv7a-unknown-linux-gnueabihf/14/man
--infodir=/usr/share/gcc-data/armv7a-unknown-linux-gnueabihf/14/info
--with-gxx-include-dir=/usr/lib/gcc/armv7a-unknown-linux-gnueabihf/14/include/g++-v14
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/armv7a-unknown-linux-gnueabihf/14/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=yes,extra
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo
14.0.1_pre20240204-r1 p20' --with-gcc-major-version-only
--enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--disable-multilib --disable-fixed-point --with-float=hard --with-arch=armv7-a
--with-float=hard --with-fpu=vfpv3-d16 --enable-libgomp --disable-libssp
--disable-libada --disable-cet --disable-systemtap
--disable-valgrind-annotations --disable-vtable-verify --disable-libvtv
--without-zstd --without-isl --enable-default-pie --enable-host-pie
--disable-host-bind-now --enable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.1 20240204 (experimental) (Gentoo 14.0.1_pre20240204-r1 p20)
```

[Bug target/113915] [14 regression] glibc miscompiled for armv7a since r14-4365-g0731889c026bfe

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113915

--- Comment #4 from Sam James  ---
better bt:
```
begin: no errors
[New LWP 250625]

Thread 2.1 "ld-linux-armhf." received signal SIGSEGV, Segmentation fault.
[Switching to LWP 250624]
_dl_find_object_update_1 (count=, loaded=) at
dl-find_object.c:777
777 atomic_store_relaxed (&target_seg->previous->size, 0);
(gdb) bt
#0  _dl_find_object_update_1 (count=, loaded=) at
dl-find_object.c:777
#1  _dl_find_object_update (new_map=new_map@entry=0xf7fbc158) at
dl-find_object.c:805
#2  0xf7fd3650 in dl_open_worker_begin (a=0xfffeec20) at dl-open.c:756
#3  0xf7fc7f54 in __GI__dl_catch_exception (exception=0xf7fa,
exception@entry=0xfffeea30, operate=0xf7fc7f54 <__GI__dl_catch_exception+112>,
args=0xfffeea38, args@entry=0xfffeec20)
at dl-catch.c:237
#4  0xf7fd2a78 in dl_open_worker (a=0xfffeec20) at dl-open.c:803
#5  0xf7fc7f54 in __GI__dl_catch_exception (exception=0xf7f2902c
<__GI___libc_unwind_link_get+76>, exception@entry=0xfffeec14,
operate=0xf7fc7f54 <__GI__dl_catch_exception+112>,
args=0xfffeec14, args@entry=0xfffeec18) at dl-catch.c:237
#6  0xf7fd2e5c in _dl_open (file=0xf7f983a0 "libgcc_s.so.1", mode=-2147483646,
caller_dlopen=0xf7f2902c <__GI___libc_unwind_link_get+76>, nsid=nsid@entry=-2,
argc=1, argv=0xfffef1b4,
env=0xfffef1bc) at dl-open.c:905
#7  0xf7f79364 in do_dlopen (ptr=0xfffeee78) at dl-libc.c:95
#8  0xf7fc7f54 in __GI__dl_catch_exception (exception=0xfffeee64,
exception@entry=0xfffeee2c, operate=0xf7fc7f54 <__GI__dl_catch_exception+112>,
args=0xfffeee34,
args@entry=0xf7fa411c ) at dl-catch.c:237
#9  0xf7fc80b0 in _dl_catch_error (objname=0xfffeee60,
objname@entry=0xfffeee58, errstring=0xfffeee64, errstring@entry=0xfffeee5c,
mallocedp=0xfffeee5f, mallocedp@entry=0xfffeee57,
operate=, args=0xfffeee78, args@entry=0xfffeee70) at
dl-catch.c:256
#10 0xf7f792c0 in dlerror_run (operate=,
args=args@entry=0xfffeee70) at dl-libc.c:45
#11 0xf7f79538 in __libc_dlopen_mode (name=,
mode=mode@entry=-2147483646) at dl-libc.c:162
#12 0xf7f2902c in __GI___libc_unwind_link_get () at unwind-link.c:51
#13 0xf7eb3300 in __pthread_cancel (th=4158874656) at pthread_cancel.c:99
#14 0xf7fc1468 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
```

[Bug target/113915] [14 regression] glibc miscompiled for armv7a since r14-4365-g0731889c026bfe

2024-02-13 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113915

--- Comment #5 from Sam James  ---
(In reply to Sam James from comment #0)
> glibc seems to go from 30 failing innocent tests (*) to over 400 between
> gcc-13 and gcc-14. Bisected to r14-4365-g0731889c026bfe which fixed PR111235.
> 
> It's hard to know where to start with this. I'll try the usual bisection of
> objects and then pragmas although I fear the (necessary) complexities of
> glibc's build system may make my usual method tricky. We'll see...
> 

Indeed, optimize("O0") pragma for _dl_find_object_update_1 in
dl-find_object.c/o avoids the crash. O1/O2 fail.

[Bug middle-end/113907] [14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113907

Sam James  changed:

   What|Removed |Added

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

[Bug target/113932] New: [meta-bug] Targets which should be ported to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932

Bug ID: 113932
   Summary: [meta-bug] Targets which should be ported to LRA
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: segher at gcc dot gnu.org
Depends on: 55212, 66207, 90785
  Target Milestone: ---

LRA is already the default for GCC for quite some time:
https://gcc.gnu.org/wiki/LRAIsDefault.

The remaining targets are using reload via opt-ins.

Please port to LRA as soon as possible, as there's a fair bit of interest in
killing reload by this point:
https://inbox.sourceware.org/gcc-patches/283c45ca085ced958cbce6e64331252c83a5899f.1682268126.git.seg...@kernel.crashing.org/#t

>From jakub:
```
$ grep TARGET_LRA_P.*void_false */*.cc
alpha/alpha.cc:#define TARGET_LRA_P hook_bool_void_false
avr/avr.cc:#define TARGET_LRA_P hook_bool_void_false
bfin/bfin.cc:#define TARGET_LRA_P hook_bool_void_false
c6x/c6x.cc:#define TARGET_LRA_P hook_bool_void_false
fr30/fr30.cc:#define TARGET_LRA_P hook_bool_void_false
frv/frv.cc:#define TARGET_LRA_P hook_bool_void_false
ia64/ia64.cc:#define TARGET_LRA_P hook_bool_void_false
lm32/lm32.cc:#define TARGET_LRA_P hook_bool_void_false
m32c/m32c.cc:#define TARGET_LRA_P hook_bool_void_false
m68k/m68k.cc:#define TARGET_LRA_P hook_bool_void_false
mcore/mcore.cc:#define TARGET_LRA_P hook_bool_void_false
mn10300/mn10300.cc:#define TARGET_LRA_P hook_bool_void_false
msp430/msp430.cc:#define TARGET_LRA_P hook_bool_void_false
pa/pa.cc:#define TARGET_LRA_P hook_bool_void_false
rl78/rl78.cc:#define TARGET_LRA_P hook_bool_void_false
visium/visium.cc:#define TARGET_LRA_P hook_bool_void_false
```


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55212
[Bug 55212] [SH] Switch to LRA
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66207
[Bug 66207] Switch alpha to LRA
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90785
[Bug 90785] [ia64] switch to LRA

[Bug target/113933] New: Switch pa to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113933

Bug ID: 113933
   Summary: Switch pa to LRA
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: danglin at gcc dot gnu.org, law at gcc dot gnu.org
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please port the PA target to LRA (see
PR113932).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113934] New: Switch avr to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113934

Bug ID: 113934
   Summary: Switch avr to LRA
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: chertykov at gmail dot com
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please port the avr target to LRA (see
PR113932).

I remember some patch for this on the ML but I don't think it went in.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113935] New: Switch bfin to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113935

Bug ID: 113935
   Summary: Switch bfin to LRA
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: jzhang918 at gmail dot com
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please port the bfin target to LRA
(see PR113932).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113936] New: Switch c6x to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113936

Bug ID: 113936
   Summary: Switch c6x to LRA
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: bernds at gcc dot gnu.org
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please port the c6x target to LRA (see
PR113932).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113937] New: Switch fr30 to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113937

Bug ID: 113937
   Summary: Switch fr30 to LRA
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: nickc at redhat dot com
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please port the fr30 target to LRA
(see PR113932).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113938] New: Switch frv to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113938

Bug ID: 113938
   Summary: Switch frv to LRA
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: aoliva at gcc dot gnu.org, nickc at redhat dot com
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please port the frv target to LRA (see
PR113932).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113939] New: Switch m68k to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113939

Bug ID: 113939
   Summary: Switch m68k to LRA
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: law at gcc dot gnu.org, schwab at gcc dot gnu.org
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please port the PA target to LRA (see
PR113932).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113940] New: Switch mcore to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113940

Bug ID: 113940
   Summary: Switch mcore to LRA
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: nickc at redhat dot com
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please port the mcore target to LRA
(see PR113932).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113941] New: Switch mn10300 to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113941

Bug ID: 113941
   Summary: Switch mn10300 to LRA
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: aoliva at gcc dot gnu.org, law at gcc dot gnu.org
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please port the mn10300 target to LRA
(see PR113932).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113942] New: Switch msp430 to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113942

Bug ID: 113942
   Summary: Switch msp430 to LRA
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: nickc at redhat dot com
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please port the msp430 target to LRA
(see PR113932).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113943] New: Switch m32c to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113943

Bug ID: 113943
   Summary: Switch m32c to LRA
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please port the m32c target to LRA
(see PR113932).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113944] New: Switch rl78 to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113944

Bug ID: 113944
   Summary: Switch rl78 to LRA
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please port the rl78 target to LRA
(see PR113932).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113945] New: Switch visium to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113945

Bug ID: 113945
   Summary: Switch visium to LRA
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: ebotcazou at gcc dot gnu.org
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please port the visium target to LRA
(see PR113932).


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113946] New: Switch ft32 to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113946

Bug ID: 113946
   Summary: Switch ft32 to LRA
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please port the ft32 target to LRA
(see PR113932).

We have -mlra on this target but it is default-off...


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113947] New: Switch pdp11 to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113947

Bug ID: 113947
   Summary: Switch pdp11 to LRA
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: ni1d at arrl dot net
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please port the pdp11 target to LRA
(see PR113932).

There's a -mlra option which is off by default for this target...


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113948] New: Switch rx to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113948

Bug ID: 113948
   Summary: Switch rx to LRA
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: nickc at redhat dot com
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please port the rx target to LRA (see
PR113932).

There's a -mlra option which is off by default for this target...


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113949] New: Switch vax to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113949

Bug ID: 113949
   Summary: Switch vax to LRA
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: macro at orcam dot me.uk, m...@3am-software.com
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please port the rx target to LRA (see
PR113932).

There's a -mlra option which is off by default for this target...


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113946] Switch ft32 to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113946

--- Comment #1 from Sam James  ---
ft32 has a maintainer (James Bowman) but I can't find a BZ account for him to
CC.

[Bug target/113946] Switch ft32 to LRA

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113946

Sam James  changed:

   What|Removed |Added

 CC||law at gcc dot gnu.org

--- Comment #2 from Sam James  ---
(In reply to Sam James from comment #1)
> ft32 has a maintainer (James Bowman) but I can't find a BZ account for him
> to CC.

The target was added in 

commit fef939d6a96bde0f924152e6b9e22701c28f8880
Author: James Bowman 
AuthorDate: Sat May 16 23:49:08 2015 +
Commit: James Bowman 
CommitDate: Sat May 16 23:49:08 2015 +

FT32 target added. Approved by Jeff Law [l...@redhat.com]

From-SVN: r223261

CCing Jeff for advice.

[Bug target/113952] New: Finish LRA transition for sparc by removing -mlra

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113952

Bug ID: 113952
   Summary: Finish LRA transition for sparc by removing -mlra
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: davem at davemloft dot net, ebotcazou at gcc dot gnu.org
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please complete the port to LRA (see
PR113932) by dropping -mlra and always using it.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113953] New: Finish LRA transition for s390 by removing -mlra

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113953

Bug ID: 113953
   Summary: Finish LRA transition for s390 by removing -mlra
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: krebbel at gcc dot gnu.org, uweigand at gcc dot gnu.org
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please complete the port to LRA (see
PR113932) by dropping -mlra and always using it.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113954] New: Finish LRA transition for arc by removing -mlra

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113954

Bug ID: 113954
   Summary: Finish LRA transition for arc by removing -mlra
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: amylaar at gcc dot gnu.org, claziss at gmail dot com
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please complete the port to LRA (see
PR113932) by dropping -mlra and always using it.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113955] New: Finish LRA transition for mips by removing -mlra

2024-02-15 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113955

Bug ID: 113955
   Summary: Finish LRA transition for mips by removing -mlra
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: syq at gcc dot gnu.org
Blocks: 113932
  Target Milestone: ---

People are getting eager to require LRA. Please complete the port to LRA (see
PR113932) by dropping -mlra and always using it.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113932
[Bug 113932] [meta-bug] Targets which should be ported to LRA

[Bug target/113960] std::map with std::vector as input overwrites itself with c++20, on s390x platform

2024-02-16 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113960

Sam James  changed:

   What|Removed |Added

 CC||sjames at gcc dot gnu.org

--- Comment #1 from Sam James  ---
I can reproduce it w/ 13.2.1 20231216 although I'd prefer to leave it to
someone else to confirm...

[Bug tree-optimization/87313] attribute malloc not used for alias analysis when it could be

2024-02-16 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87313

Sam James  changed:

   What|Removed |Added

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

--- Comment #5 from Sam James  ---
(In reply to Petr Skocik from comment #4)

PR106850 for that, pretty much.

[Bug c/88687] redundant -Wbuiltin-declaration-mismatch after -Wimplicit-function-declaration

2024-02-16 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88687

Sam James  changed:

   What|Removed |Added

   Last reconfirmed||2024-02-17
 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #1 from Sam James  ---
Confirmed. I wasn't sure if this would've gone away with some of the earlier
diagnostic fixups wrt permerror but it hasn't.

[Bug c/71219] Warn about (struct S*)malloc(n) where n < sizeof(struct S)

2024-02-16 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71219

Sam James  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
   Target Milestone|--- |14.0
 Resolution|--- |FIXED

--- Comment #7 from Sam James  ---
Fixed for 14?

[Bug libgcc/113497] error: implicit declaration of function 'abort' on enable-execute-stack.c on i686-w64-mingw32 target

2024-02-16 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113497

Sam James  changed:

   What|Removed |Added

   Last reconfirmed||2024-02-17
 Ever confirmed|0   |1
 CC||law at gcc dot gnu.org,
   ||sjames at gcc dot gnu.org
 Status|UNCONFIRMED |NEW

--- Comment #3 from Sam James  ---
Fixed in r14-8753-g2c27aa8d75113f. It should probably be backported though to
11/12/13.

[Bug c++/113976] [11/12/13/14 Regression] explicit instantiation of const variable template following implicit instantiation is assembled in .rodata instead of .bss

2024-02-17 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113976

Sam James  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2024-02-18
 Ever confirmed|0   |1

[Bug target/113915] [14 regression] glibc's _dl_find_object_update_1 miscompiled for armv7a since r14-4365-g0731889c026bfe

2024-02-18 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113915

--- Comment #12 from Sam James  ---
(In reply to Andrew Pinski from comment #9)
> This should work, I think:
> [...]

I'm going to apply this tonight for our arm builds downstream as we can't do
any testing right now and there's a lot of bugs I'm hitting which look like
they could be dupes of this.

[Bug target/113986] New: [14 regression] Build failure on aarch64-linux-musl (error: 'export_load_16' aliased to undefined symbol 'libat_load_16')

2024-02-18 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113986

Bug ID: 113986
   Summary: [14 regression] Build failure on aarch64-linux-musl
(error: 'export_load_16' aliased to undefined symbol
'libat_load_16')
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: csfore at posteo dot net
  Target Milestone: ---

Created attachment 57458
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57458&action=edit
build.log.xz

This is with the patch from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113971#c2 to get past that error.

Reported by Christopher Fore.
```
/bin/sh ./libtool  --tag=CC   --mode=compile
/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/build/./gcc/xgcc
-B/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/build/./gcc/
-B/usr/aarch64-gentoo-linux-musl/bin/ -B/usr/aarch64-gentoo-linux-musl/lib/
-isystem /usr/aarch64-gentoo-linux-musl/include -isystem
/usr/aarch64-gentoo-linux-musl/sys-include   -fchecking=1 -DHAVE_CONFIG_H
-I/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic/config/aarch64
-I/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic/config/linux/aarch64
-I/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic/config/posix
-I/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic
-I.-mno-outline-atomics -Wall   -pthread -g -pipe -O2  -DN=16  -c -o
load_16_.lo
/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic/load_n.c
In file included from
/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic/load_n.c:25:
/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic/libatomic_i.h:288:40:
error: 'export_load_16' aliased to undefined symbol 'libat_load_16'
  288 | extern typeof(C2(libat_,X)) C2(export_,X)   \
  |^~~
/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic/libatomic_i.h:40:25:
note: in definition of macro 'C2_'
   40 | #define C2_(X,Y)X ## Y
  | ^
/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic/libatomic_i.h:288:37:
note: in expansion of macro 'C2'
  288 | extern typeof(C2(libat_,X)) C2(export_,X)   \
  | ^~
/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/gcc-14-20240211/libatomic/load_n.c:115:1:
note: in expansion of macro 'EXPORT_ALIAS'
  115 | EXPORT_ALIAS (SIZE(load));
  | ^~~~
make[4]: *** [Makefile:900: load_16_.lo] Error 1
make[4]: Leaving directory
'/var/tmp/portage/sys-devel/gcc-14.0.1_pre20240211-r1/work/build/aarch64-gentoo-linux-musl/libatomic'
make[3]: *** [Makefile:651: all-recursive] Error 1
```

[Bug target/114027] [14] RISC-V vector: miscompile at -O3

2024-02-20 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114027

--- Comment #1 from Sam James  ---
When this is fixed, this is probably worth putting in the general torture test
suite, not just for riscv.

[Bug target/90204] [11/12/13/14 Regression] C code is optimized worse than C++

2024-02-20 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90204

Sam James  changed:

   What|Removed |Added

 CC||liuhongt at gcc dot gnu.org

--- Comment #22 from Sam James  ---
r12-5390-gd3152981f71eef (Reduce cost of aligned sse register store.) seems to
be the fix.

[Bug target/114027] [14] RISC-V vector: miscompile at -O3

2024-02-22 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114027

--- Comment #7 from Sam James  ---
(In reply to Robin Dapp from comment #6)
> Btw this fails on x86 and aarch64 for me with -fno-vect-cost-model.  So it
> definitely looks generic.

What args did you use? I can't get it to fail.

[Bug middle-end/114048] New: [14 regression] ICE when building libowfat-0.33 on x86

2024-02-22 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114048

Bug ID: 114048
   Summary: [14 regression] ICE when building libowfat-0.33 on x86
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57490
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57490&action=edit
critbit.i

Originally reported downstream in Gentoo by Agostino Sarubbo at
https://bugs.gentoo.org/925231.

```
$ i686-pc-linux-gnu-gcc -c critbit/critbit.c -I. -O2 -march=i686 -mfpmath=sse
-msse2 -fomit-frame-pointer
during GIMPLE pass: fre
critbit/critbit.c: In function ‘allprefixed_traverse’:
critbit/critbit.c:184:12: internal compiler error: in
copy_reference_ops_from_ref, at tree-ssa-sccvn.cc:1165
  184 | static int allprefixed_traverse(uint8_t* top,int(*handle)(const
char*,void*),void* arg) {
  |^~~~
0x56e000cf copy_reference_ops_from_ref
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-sccvn.cc:1165
0x58665915 valueize_shared_reference_ops_from_ref
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-sccvn.cc:1858
0x58665915 vn_reference_lookup(tree_node*, tree_node*, vn_lookup_kind,
vn_reference_s**, bool, tree_node**, tree_node*, bool)
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-sccvn.cc:4063
0x585da936 visit_reference_op_load
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-sccvn.cc:5852
0x585da936 visit_stmt
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-sccvn.cc:6373
0x585d43a0 process_bb
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-sccvn.cc:8145
0x585ca491 do_rpo_vn_1
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-sccvn.cc:8746
0x585ef988 execute
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-sccvn.cc:8907
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
```

```
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-pc-linux-gnu/14/lto-wrapper
Target: i686-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-14.0./work/gcc-14.0./configure
--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --prefix=/usr
--bindir=/usr/i686-pc-linux-gnu/gcc-bin/14
--includedir=/usr/lib/gcc/i686-pc-linux-gnu/14/include
--datadir=/usr/share/gcc-data/i686-pc-linux-gnu/14
--mandir=/usr/share/gcc-data/i686-pc-linux-gnu/14/man
--infodir=/usr/share/gcc-data/i686-pc-linux-gnu/14/info
--with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/14/include/g++-v14
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/i686-pc-linux-gnu/14/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=yes,extra,rtl,df
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 14.0. p,
commit 568b3f9940f87a775060aea789b2f438af477e9f' --with-gcc-major-version-only
--enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--disable-multilib --disable-fixed-point --with-arch=i686 --enable-targets=all
--enable-libgomp --disable-libssp --disable-libada --disable-cet
--disable-systemtap --disable-valgrind-annotations --disable-vtable-verify
--disable-libvtv --with-zstd --without-isl --enable-default-pie
--enable-host-pie --disable-host-bind-now --enable-default-ssp
--with-build-config='bootstrap-O3 bootstrap-lto'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240215 (experimental)
b3b3bd250f0a7c22b7d46d3522c8b94c6a35d22a (Gentoo 14.0. p, commit
568b3f9940f87a775060aea789b2f438af477e9f)
```

[Bug middle-end/114048] [14 regression] ICE when building libowfat-0.33 on x86

2024-02-22 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114048

--- Comment #1 from Sam James  ---
Reducing...

[Bug middle-end/113907] [12/13/14 regression] ICU miscompiled since on x86 since r14-5109-ga291237b628f41

2024-02-22 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113907

Sam James  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |hubicka at gcc dot 
gnu.org
 Status|NEW |ASSIGNED

--- Comment #48 from Sam James  ---
(In reply to Jan Hubicka from comment #37)
> [...]
> Jakub, also I can take over the patch - and sorry for beging slow. I had
> visitor doing some research last two weeks and I am trying to catch up
> now.

I'll assign to you, thanks!

[Bug middle-end/114048] [14 regression] ICE when building libowfat-0.33 on x86

2024-02-22 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114048

--- Comment #2 from Sam James  ---
Reduced:
```
typedef struct {
  void *child[2];
  char otherbits;
} critbit0_node;

int allprefixed_traverse(char *top) {
  if (top) {
critbit0_node *q = (void *)top - 1;
int direction = 0;
for (;; ++direction)
  switch (allprefixed_traverse(q->child[direction])) {
  case 1:
break;
  case 0:
return 0;
  default:
return 1;
  }
  }
}
```

[Bug middle-end/114048] [14 regression] ICE when building libowfat-0.33

2024-02-22 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114048

Sam James  changed:

   What|Removed |Added

Summary|[14 regression] ICE when|[14 regression] ICE when
   |building libowfat-0.33 on   |building libowfat-0.33
   |x86 |

--- Comment #3 from Sam James  ---
It crashes on amd64 for me too but differently:
```

$ gcc /tmp/foo.c -O2
during GIMPLE pass: fre
/tmp/foo.c: In function ‘allprefixed_traverse’:
/tmp/foo.c:6:5: internal compiler error: in copy_reference_ops_from_ref, at
tree-ssa-sccvn.cc:1185
6 | int allprefixed_traverse(char *top) {
  | ^~~~
0x55da5656e87d copy_reference_ops_from_ref
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-sccvn.cc:1185

/tmp/foo.c:6:5: internal compiler error: Segmentation fault
0x55da5700a7f6 crash_signal
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/toplev.cc:317
0x55da582ff8d7 x86_64_fallback_frame_state
./md-unwind-support.h:63
0x55da582ff8d7 uw_frame_state_for
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./libgcc/unwind-dw2.c:1013
0x55da583009fd _Unwind_Backtrace
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./libgcc/unwind.inc:303
0x55da57773aa8 backtrace_full
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./libbacktrace/backtrace.c:127
0x55da561080dd diagnostic_context::action_after_output(diagnostic_t)
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/diagnostic.cc:781
0x55da5785edeb diagnostic_action_after_output(diagnostic_context*,
diagnostic_t)
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/diagnostic.h:1002
0x55da5785edeb diagnostic_context::report_diagnostic(diagnostic_info*)
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/diagnostic.cc:1633
0x55da57fa21e8 diagnostic_impl
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/diagnostic.cc:1767
0x55da5773d17f internal_error(char const*, ...)
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/diagnostic.cc:2225
0x55da57714254 fancy_abort(char const*, int, char const*)
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/diagnostic.cc:2336
0x55da5656e87d copy_reference_ops_from_ref
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-sccvn.cc:1185
```

and w/ valgrind:
```
$ gcc /tmp/foo.c -O2 -wrapper valgrind
==2895261== Memcheck, a memory error detector
==2895261== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==2895261== Using Valgrind-3.23.0.GIT and LibVEX; rerun with -h for copyright
info
==2895261== Command: /usr/libexec/gcc/x86_64-pc-linux-gnu/14/cc1 -quiet
/tmp/foo.c -quiet -dumpdir a- -dumpbase foo.c -dumpbase-ext .c -mtune=generic
-march=x86-64 -O2 -o /tmp/cc89yYYR.s
==2895261==
during GIMPLE pass: fre
/tmp/foo.c: In function ‘allprefixed_traverse’:
/tmp/foo.c:6:5: internal compiler error: in copy_reference_ops_from_ref, at
tree-ssa-sccvn.cc:1185
6 | int allprefixed_traverse(char *top) {
  | ^~~~
0x7c787d copy_reference_ops_from_ref
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-sccvn.cc:1185
==2895261== Invalid read of size 1
==2895261==at 0x25588D7: x86_64_fallback_frame_state
(md-unwind-support.h:63)
==2895261==by 0x25588D7: uw_frame_state_for (unwind-dw2.c:1013)
==2895261==by 0x25599FD: _Unwind_Backtrace (unwind.inc:303)
==2895261==by 0x19CCAA8: backtrace_full (backtrace.c:127)
==2895261==by 0x3610DD:
diagnostic_context::action_after_output(diagnostic_t) [clone .cold]
(diagnostic.cc:781)
==2895261==by 0x1AB7DEB: UnknownInlinedFun (diagnostic.h:1002)
==2895261==by 0x1AB7DEB:
diagnostic_context::report_diagnostic(diagnostic_info*) (diagnostic.cc:1633)
==2895261==by 0x21FB1E8: diagnostic_impl(rich_location*,
diagnostic_metadata const*, int, char const*, __va_list_tag (*) [1],
diagnostic_t) [clone .lto_priv.0] (diagnostic.cc:1767)
==2895261==by 0x199617F: internal_error(char const*, ...)
(diagnostic.cc:2225)
==2895261==by 0x196D254: fancy_abort(char const*, int, char const*)
(diagnostic.cc:2336)
==2895261==by 0x7C787D: copy_reference_ops_from_ref(tree_node*,
vec*) [clone .lto_priv.0] [clone
.cold] (tree-ssa-sccvn.cc:1185)
==2895261==  Address 0x864f60e8d98948 is not stack'd, malloc'd or (recently)
free'd
==2895261==

/tmp/foo.c:6:5: internal compiler error: Segmentation fault

```

[Bug c++/114050] Inconsistency in double/float constant evaluation between 32 and 64 bit

2024-02-22 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114050

Sam James  changed:

   What|Removed |Added

 CC||sjames at gcc dot gnu.org

--- Comment #4 from Sam James  ---
(and -mfpmath=sse works.)

[Bug c/114052] [11/12/13/14 Regression] Wrong code at -O2 for well-defined infinite loop

2024-02-22 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114052

--- Comment #2 from Sam James  ---
Created attachment 57494
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57494&action=edit
test.c

Attaching godbolt testcase.

[Bug tree-optimization/114068] New: [14 regression] ICE when building darktable-4.6.1 (error: PHI node with wrong VUSE on edge from BB 25)

2024-02-22 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114068

Bug ID: 114068
   Summary: [14 regression] ICE when building darktable-4.6.1
(error: PHI node with wrong VUSE on edge from BB 25)
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57505
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57505&action=edit
RawImage.cpp.ii.xz

Initially reported downstream in Gentoo by tdr.

```
# /usr/bin/x86_64-pc-linux-gnu-g++ -DGDK_DISABLE_DEPRECATED
-DGTK_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES -DNDEBUG -D_RELEASE
-D_XOPEN_SOURCE=700
-I/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1_build/lib64/darktable/rawspeed/src/librawspeed/common
-I/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1/src/external/rawspeed/src/librawspeed/common
-I/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1_build/lib64/darktable/rawspeed/src
-I/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1/src/external/rawspeed/src/librawspeed/common/..
-isystem
/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1/src/external/rawspeed/src/external
 -march=native -O3 -pipe -mavx -msse3 -Wall -Wformat -Wformat-security -Wshadow
-Wtype-limits -Wvla -Wmaybe-uninitialized -Wno-unknown-pragmas
-Wno-error=varargs -Wno-format-truncation -Wno-error=address-of-packed-member
-w -Wall -Wextra -Wcast-qual -Wextra -Wextra-semi -Wformat=2 -Wpointer-arith
-Wvla -Wmissing-format-attribute -Wsuggest-attribute=format
-Wno-unused-parameter -Wno-maybe-uninitialized -Wno-stringop-overflow
-Wno-array-bounds -Wstack-usage=4096 -Wframe-larger-than=4096
-Wlarger-than=32768  -O3 -std=c++20 -fPIC -fvisibility=hidden
-fvisibility-inlines-hidden   -march=native -g3 -ggdb3 -fopenmp -MD -MT
lib64/darktable/rawspeed/src/librawspeed/common/CMakeFiles/rawspeed_common.dir/RawImage.cpp.o
-MF
lib64/darktable/rawspeed/src/librawspeed/common/CMakeFiles/rawspeed_common.dir/RawImage.cpp.o.d
-o
lib64/darktable/rawspeed/src/librawspeed/common/CMakeFiles/rawspeed_common.dir/RawImage.cpp.o
-c
/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1/src/external/rawspeed/src/librawspeed/common/RawImage.cpp
 
/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1/src/external/rawspeed/src/librawspeed/common/RawImage.cpp:
In member function ‘void
rawspeed::RawImageData::clearArea(rawspeed::iRectangle2D)’:
/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1/src/external/rawspeed/src/librawspeed/common/RawImage.cpp:325:6:
error: PHI node with wrong VUSE on edge from BB 25
  325 | void RawImageData::clearArea(iRectangle2D area) {
  |  ^~~~
.MEM_201 = PHI <.MEM_162(25)>
expected .MEM_155
during GIMPLE pass: vect
/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1/src/external/rawspeed/src/librawspeed/common/RawImage.cpp:325:6:
internal compiler error: verify_ssa failed
0x562cb4452725 verify_ssa(bool, bool)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/gcc/tree-ssa.cc:1203

/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1/src/external/rawspeed/src/librawspeed/common/RawImage.cpp:325:6:
internal compiler error: Segmentation fault
0x562cb4155596 crash_signal
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/gcc/toplev.cc:317
0x7fa03922e07f ???
   
/var/tmp/portage/sys-libs/glibc-2.38-r11/work/glibc-2.38/signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0x562cb5a2f12f x86_64_fallback_frame_state
./md-unwind-support.h:63
0x562cb5a2f12f uw_frame_state_for
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/libgcc/unwind-dw2.c:1013
0x562cb5a300e5 _Unwind_Backtrace
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/libgcc/unwind.inc:303
0x562cb56fe80b backtrace_full
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/libbacktrace/backtrace.c:127
0x562cb562138b diagnostic_context::action_after_output(diagnostic_t)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/gcc/diagnostic.cc:781
0x562cb55feb6b diagnostic_action_after_output(diagnostic_context*,
diagnostic_t)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/gcc/diagnostic.h:1002
0x562cb55feb6b diagnostic_context::report_diagnostic(diagnostic_info*)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/gcc/diagnostic.cc:1633
0x562cb55fefb0 diagnostic_impl
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/gcc/diagnostic.cc:1767
0x562cb55ff2b9 internal_error(char const*, ...)
   
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240218/gcc-14-20240218/gcc/diagnostic.cc:2225
0x562cb4452725 verify_ssa(bool, bool)
  

[Bug tree-optimization/114068] [14 regression] ICE when building darktable-4.6.1 (error: PHI node with wrong VUSE on edge from BB 25)

2024-02-22 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114068

--- Comment #1 from Sam James  ---
Reducing now...

[Bug tree-optimization/114068] [14 regression] ICE when building darktable-4.6.1 (error: PHI node with wrong VUSE on edge from BB 25)

2024-02-22 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114068

--- Comment #2 from Sam James  ---
Note that this is the second time we've seen the weird "double crash" w/
x86_64_fallback_frame_state when unwinding, see
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114048#c3 too.

[Bug rtl-optimization/114070] New: [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model

2024-02-22 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114070

Bug ID: 114070
   Summary: [12/13/13 regression] ICE when building git-2.43.2
with -mcpu=niagara4 -fno-vect-cost-model
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rtl-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57506
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57506&action=edit
merge-tree.i.xz

I'm not sure if this is an rtl-optimization bug or a target bug.

```
sparc64-unknown-linux-gnu-gcc -o builtin/merge-tree.o -c -MF
builtin/.depend/merge-tree.o.d -MQ builtin/merge-tree.o -MMD -MP-O3
-mcpu=niagara4 -pipe -fno-semantic-interposition -fno-vect-cost-model
-U_FORTIFY_SOURCE -fno-hardened -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"sparc64\""
-DUSE_LIBPCRE2 -DHAVE_ALLOCA_H  -DUSE_CURL_FOR_IMAP_SEND -DSUPPORTS_SIMPLE_IPC
-DSHA1_BLK -DSHA256_BLK  -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME
-DHAVE_CLOCK_MONOTONIC -DHAVE_SYNC_FILE_RANGE -DHAVE_GETDELIM
'-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES
-DNO_STRLCPY -DSHELL_PATH='"/bin/sh"'  builtin/merge-tree.c
during RTL pass: expand
builtin/merge-tree.c: In function ‘threeway_callback’:
builtin/merge-tree.c:327:12: internal compiler error: in do_store_flag, at
expr.cc:13547
  327 | static int threeway_callback(int n UNUSED, unsigned long mask,
  |^
rm -f xdiff/lib.a && sparc64-unknown-linux-gnu-ar rcs xdiff/lib.a
xdiff/xdiffi.o xdiff/xemit.o xdiff/xhistogram.o xdiff/xmerge.o
xdiff/xpatience.o xdiff/xprepare.o xdiff/xutils.o
0x172aa17 do_store_flag
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/expr.cc:13547
0x172b103 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/expr.cc:10684
0x173c15f expand_expr_real_gassign(gassign*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/expr.cc:11096
0x1736923 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/expr.cc:11277
0x19093af expand_normal(tree_node*)
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/expr.h:322
0x19093af expand_vec_cond_optab_fn
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/internal-fn.cc:3081
0x191dae3 expand_internal_call(internal_fn, gcall*)
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/internal-fn.cc:4913
0x191dae3 expand_internal_call(gcall*)
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/internal-fn.cc:4921
0x154ae5b expand_call_stmt
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/cfgexpand.cc:2771
0x154ae5b expand_gimple_stmt_1
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/cfgexpand.cc:3932
0x154ae5b expand_gimple_stmt
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/cfgexpand.cc:4077
0x1554c5f expand_gimple_basic_block
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/cfgexpand.cc:6133
0x15578df execute
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/cfgexpand.cc:6872
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
```

```
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/sparc64-unknown-linux-gnu/14/lto-wrapper
Target: sparc64-unknown-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-14.0./work/gcc-14.0./configure
--host=sparc64-unknown-linux-gnu --build=sparc64-unknown-linux-gnu
--prefix=/usr --bindir=/usr/sparc64-unknown-linux-gnu/gcc-bin/14
--includedir=/usr/lib/gcc/sparc64-unknown-linux-gnu/14/include
--datadir=/usr/share/gcc-data/sparc64-unknown-linux-gnu/14
--mandir=/usr/share/gcc-data/sparc64-unknown-linux-gnu/14/man
--infodir=/usr/share/gcc-data/sparc64-unknown-linux-gnu/14/info
--with-gxx-include-dir=/usr/lib/gcc/sparc64-unknown-linux-gnu/14/include/g++-v14
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/sparc64-unknown-linux-gnu/14/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=yes,extra,rtl
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 14.0. p,
commit e54a7fbca63053b5753fd9ba543c27ef392d3084' --with-gcc-major-version-only
--enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_

[Bug rtl-optimization/114070] [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model

2024-02-22 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114070

--- Comment #1 from Sam James  ---
I'll reduce.

[Bug tree-optimization/114068] [14 regression] ICE when building darktable-4.6.1 (error: PHI node with wrong VUSE on edge from BB 25) since r14-8768

2024-02-23 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114068

--- Comment #9 from Sam James  ---
```
template  struct Array1DRef {
  T data;
  T *addressOf(int eltIdx) { return &data + eltIdx; }
};
template  struct CroppedArray1DRef {
  Array1DRef base;
  int numElts;
  void getAsArray1DRef() {
if (numElts)
  __builtin_unreachable();
  }
  T &operator()(int eltIdx) {
if (eltIdx > numElts)
  __builtin_unreachable();
return *base.addressOf(eltIdx);
  }
};
struct Array2DRef {
  CroppedArray1DRef __trans_tmp_2;
  void operator[](int) { __trans_tmp_2.getAsArray1DRef(); }
} clearArea_base0;
CroppedArray1DRef __trans_tmp_1;
int clearArea_y, clearArea_posx;
void clearArea() {
  Array2DRef base = clearArea_base0;
  for (int x = clearArea_posx; x; ++x) {
base.operator[](clearArea_y);
__trans_tmp_1(x) = 0;
  }
}
```

[Bug tree-optimization/114068] [14 regression] ICE when building darktable-4.6.1 (error: PHI node with wrong VUSE on edge from BB 25) since r14-8768

2024-02-23 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114068

--- Comment #10 from Sam James  ---
last one:
```
struct c {
  int b;
  int *d(int e) { return &b + e; }
};
struct g {
  c base;
  int f;
  void j() {
if (f)
  __builtin_unreachable();
  }
  int &p(int e) {
if (e > 1)
  __builtin_unreachable();
return *base.d(e);
  }
} l;
struct h {
  g i;
  void q() { i.j(); }
} k;
int m;
void n() {
  h a = k;
  for (int o = m; o; ++o) {
a.q();
l.p(o) = 1;
  }
}
```

[Bug middle-end/114070] [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model

2024-02-23 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114070

--- Comment #4 from Sam James  ---
reduced:
```
struct name_entry {
  int mode;
} traverse_trees(), *unresolved_n;

void unresolved(int i, unsigned dirmask, unsigned mask) {
  for (; i; i++) {
mask |= 1;
if (!unresolved_n[i].mode || unresolved_n[i].mode & 7)
  dirmask |= i;
  }
  if (dirmask == mask)
traverse_trees();
}
```

and yeah, sorry Richard - I can't reproduce via cross either on my build. I
wasn't aware of that configure test..

[Bug tree-optimization/114079] New: [14 regression] fftw fails tests again with -O3 -march=znver2 -m32

2024-02-23 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114079

Bug ID: 114079
   Summary: [14 regression] fftw fails tests again with -O3
-march=znver2 -m32
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

It's not the same as PR113059, although it's the same initial symptoms :(

```
wget https://www.fftw.org/fftw-3.3.10.tar.gz && tar xvf fftw-3.3.10.tar.xz
./configure CFLAGS="-O3 -march=znver2 -m32 -ggdb3"
make -j$(nproc)
make check -j$(nproc) # should fail, probably on tests/bench --verify
okd6912o01 (you can extract the verify param from gdb)
```

```
$ libtool --mode=execute gdb --args /home/sam/data/fftw/fftw-3.3.10/tests/bench
--verify okd6912o01
Reading symbols from /home/sam/data/fftw/fftw-3.3.10/tests/bench...
(gdb) r
Starting program: /home/sam/data/fftw/fftw-3.3.10/tests/bench --verify
okd6912o01
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
r2cf_32 (R0=0x9ee0, R1=0x9ff0, Cr=0x9ee0, Ci=,
rs=, csr=0x566c2080, csi=0x0, v=, ivs=1, ovs=1)
at r2cf_32.c:490
490 Ci[WS(csi, 8)] = T29 - T28;
(gdb) bt
#0  r2cf_32 (R0=0x9ee0, R1=0x9ff0, Cr=0x9ee0, Ci=,
rs=, csr=0x566c2080, csi=0x0, v=, ivs=1, ovs=1)
at r2cf_32.c:490
#1  0x5663e323 in dobatch_r2hc (ego=0x566c1780, I=0x566b30b0, O=0x566b30b0,
buf=0x9ee0, batchsz=1) at direct-r2c.c:91
#2  0x5663e44d in iterate (ego=0x566c1780, I=, O=, dobatch=) at direct-r2c.c:142
#3  0x565a86e5 in fftw_rdft_solve (ego_=0x566c1780, p_=0x566c1c50) at
solve.c:29
#4  0x56563d8b in measure (pln=, p=, iter=1) at
timer.c:136
#5  fftw_measure_execution_time (plnr=0x566a9710, pln=0x566c1780, p=0x566c1c50)
at timer.c:159
#6  0x56561053 in evaluate_plan (ego=ego@entry=0x566a9710,
pln=pln@entry=0x566c1780, p=p@entry=0x566c1c50) at planner.c:460
#7  0x565620a3 in search0 (ego=ego@entry=0x566a9710, p=p@entry=0x566c1c50,
slvndx=slvndx@entry=0xc2bc, flagsp=) at planner.c:529
#8  0x56562467 in search (ego=0x566a9710, p=0x566c1c50, slvndx=0xc2bc,
flagsp=0xc2c0) at planner.c:600
#9  mkplan (ego=, p=) at planner.c:711
#10 0x56562f00 in fftw_mkplan_d (ego=0x566a9710, p=0x566c1c50) at planner.c:970
#11 0x5663f3eb in mkcldw (ego_=0x566ac3a0, kind=R2HC00, r=32, m=216, ms=1, v=1,
vs=0, mstart=0, mcount=109, IO=0x566b30b0, plnr=0x566a9710) at
hc2hc-direct.c:205
#12 0x565a26d0 in mkplan (ego_=0x566ac3a0, p_=0x566c1830, plnr=0x566a9710) at
hc2hc.c:142
#13 0x56562151 in invoke_solver (ego=0x566a9710, p=,
s=, nflags=) at planner.c:486
#14 search0 (ego=ego@entry=0x566a9710, p=p@entry=0x566c1830,
slvndx=slvndx@entry=0xc4ec, flagsp=) at planner.c:529
#15 0x56562467 in search (ego=0x566a9710, p=0x566c1830, slvndx=0xc4ec,
flagsp=0xc4f0) at planner.c:600
#16 mkplan (ego=, p=) at planner.c:711
#17 0x56562f00 in fftw_mkplan_d (ego=0x566a9710, p=0x566c1830) at planner.c:970
#18 0x5662af0f in mkplan (ego_=0x566b3080, p_=0x566c0da0, plnr=0x566a9710) at
reodft010e-r2hc.c:357
#19 0x56562151 in invoke_solver (ego=0x566a9710, p=,
s=, nflags=) at planner.c:486
#20 search0 (ego=ego@entry=0x566a9710, p=p@entry=0x566c0da0,
slvndx=slvndx@entry=0xc6cc, flagsp=) at planner.c:529
#21 0x565628a8 in search (ego=0x566a9710, p=0x566c0da0, slvndx=0xc6cc,
flagsp=0xc6d0) at planner.c:600
#22 mkplan (ego=, p=) at planner.c:711
#23 0x5655ea4a in mkplan0 (plnr=0x566a9710, flags=1, prb=,
hash_info=0, wisdom_state=WISDOM_NORMAL) at apiplan.c:42
#24 mkplan (plnr=0x566a9710, flags=1, prb=, hash_info=0) at
apiplan.c:56
#25 fftw_mkapiplan (sign=, flags=, prb=) at apiplan.c:124
#26 0x56560464 in fftw_plan_many_r2r (rank=1, n=0xc860, howmany=1,
in=0x5668e680, inembed=, istride=1, idist=1, out=0x5669bf00,
onembed=0x0, ostride=1, odist=1,
kind=0xc86c, flags=1) at plan-many-r2r.c:40
#27 0x5656060a in fftw_plan_r2r (rank=1, n=0xc860, in=0x5668e680,
out=0x5669bf00, kind=0xc86c, flags=1) at plan-r2r.c:26
#28 0x565604ac in fftw_plan_r2r_1d (n=, in=0x5668e680,
out=0x5669bf00, kind=, flags=1) at plan-r2r-1d.c:25
#29 0x5655bc19 in mkplan_r2r (p=0x5668e080, flags=1) at bench.c:451
#30 mkplan (p=0x5668e080, flags=1) at bench.c:525
#31 0x5655d980 in setup (p=0x5668e080) at fftw-bench.c:243
#32 0x56642d6b in verify (param=0xcce2 "okd6912o01", rounds=10, tol=1e-10)
at verify.c:55
#33 0x5663ff99 in bench_main (argc=, argv=) at
bench-main.c:107
#34 0x56559337 in main (argc=3, argv=0xca94) at main.c:38
```

[Bug tree-optimization/114079] [14 regression] fftw fails tests again with -O3 -march=znver2 -m32

2024-02-23 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114079

--- Comment #1 from Sam James  ---
I'll bisect it now.

[Bug tree-optimization/114079] [14 regression] fftw fails tests again with -O3 -march=znver2 -m32

2024-02-23 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114079

Sam James  changed:

   What|Removed |Added

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

--- Comment #2 from Sam James  ---
Actually, I think the test is really flaky (sometimes it pases, but it'll fail
if you try it a few times). If I checkout Jakub's fix from PR113059 in a loop,
it still fails. It's surely the same thing then?

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

[Bug target/113059] [15 regression] fftw fails tests for -O3 -m32 -march=znver2 since r14-6210-ge44ed92dbbe9d4

2024-02-23 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113059

--- Comment #26 from Sam James  ---
*** Bug 114079 has been marked as a duplicate of this bug. ***

[Bug target/113059] [15 regression] fftw fails tests for -O3 -m32 -march=znver2 since r14-6210-ge44ed92dbbe9d4

2024-02-23 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113059

--- Comment #27 from Sam James  ---
Can someone sanity-check me on this by trying the instructions at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114079#c0?

I think I can still hit the original crash, it's just flaky (it might pass
sometimes).

[Bug middle-end/114081] New: [14 regression] ICE in verify_dominators when building php-8.3.3 (error: dominator of 16 should be 111, not 3)

2024-02-23 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114081

Bug ID: 114081
   Summary: [14 regression] ICE in verify_dominators when building
php-8.3.3 (error: dominator of 16 should be 111, not
3)
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57513
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57513&action=edit
filter.i.xz

(I need to work around another problem with broken unwinding, so someone else
will need to post a proper bt here.)

```
$ x86_64-pc-linux-gnu-cc -Iext/filter/
-I/var/tmp/portage/dev-lang/php-8.3.3/work/sapis-build/cli/ext/filter/
-I/var/tmp/portage/dev-lang/php-8.3.3/work/sapis-build/cli/include
-I/var/tmp/portage/dev-lang/php-8.3.3/work/sapis-build/cli/main
-I/var/tmp/portage/dev-lang/php-8.3.3/work/sapis-build/cli
-I/usr/include/valgrind
-I/var/tmp/portage/dev-lang/php-8.3.3/work/sapis-build/cli/ext/date/lib
-I/usr/include/libxml2
-I/var/tmp/portage/dev-lang/php-8.3.3/work/sapis-build/cli/ext/mbstring/libmbfl
-I/var/tmp/portage/dev-lang/php-8.3.3/work/sapis-build/cli/ext/mbstring/libmbfl/mbfl
-I/usr/include/pspell
-I/var/tmp/portage/dev-lang/php-8.3.3/work/sapis-build/cli/TSRM
-I/var/tmp/portage/dev-lang/php-8.3.3/work/sapis-build/cli/Zend  -D_GNU_SOURCE 
-fno-common -Wstrict-prototypes -Wformat-truncation -Wlogical-op
-Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-unused-parameter
-Wno-sign-compare -O3 -march=native -mtls-dialect=gnu2
-fno-semantic-interposition -pipe -fno-vect-cost-model -Wa,-O2
-Wa,-mtune=znver2 -fdiagnostics-color=always -fdiagnostics-urls=never
-frecord-gcc-switches -Wreturn-type -Walloc-size -Wfree-nonheap-object
-Wstrict-aliasing=2 -Wbuiltin-declaration-mismatch -Wformat -Wformat-security
-Waddress -Warray-bounds -Wfree-nonheap-object -Wint-to-pointer-cast -Wmain
-Wnonnull -Wodr -Wreturn-type -Wsizeof-pointer-memaccess -Wstrict-aliasing
-Wstring-compare -Wuninitialized -Wvarargs -fvisibility=hidden
-Wimplicit-fallthrough=1 -DZEND_SIGNALS   -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1
-c /var/tmp/portage/dev-lang/php-8.3.3/work/sapis-build/cli/ext/filter/filter.c
-o ext/filter/filter.lo  -MMD -MF ext/filter/filter.dep -MT
ext/filter/filter.lo -save-temps
x86_64-pc-linux-gnu-cc: warning: ‘-pipe’ ignored because ‘-save-temps’
specified
/var/tmp/portage/dev-lang/php-8.3.3/work/sapis-build/cli/ext/filter/filter.c:
In function ‘php_zval_filter.constprop’:
/var/tmp/portage/dev-lang/php-8.3.3/work/sapis-build/cli/ext/filter/filter.c:247:13:
error: dominator of 16 should be 111, not 3
  247 | static void php_zval_filter(zval *value, zend_long filter, zend_long
flags, zval *options, char* charset, bool copy) /* {{{ */
  | ^~~
during GIMPLE pass: vect
/var/tmp/portage/dev-lang/php-8.3.3/work/sapis-build/cli/ext/filter/filter.c:247:13:
internal compiler error: in verify_dominators, at dominance.cc:1194
0x563590c8a390 verify_dominators(cdi_direction) [clone .constprop.0]
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/dominance.cc:1194

/var/tmp/portage/dev-lang/php-8.3.3/work/sapis-build/cli/ext/filter/filter.c:247:13:
internal compiler error: Segmentation fault
```

[Bug middle-end/114081] [14 regression] ICE in verify_dominators when building php-8.3.3 (error: dominator of 16 should be 111, not 3)

2024-02-23 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114081

--- Comment #1 from Sam James  ---
I can reproduce with: gcc -c ./ext/filter/filter.i -march=znver2
-fno-vect-cost-model -O3.

[Bug target/66874] RFE: x86_64_fallback_frame_state more robust

2024-02-23 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66874

Sam James  changed:

   What|Removed |Added

 CC||arsen at gcc dot gnu.org

--- Comment #2 from Sam James  ---
I've been going crazy hitting this recently (see e.g.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114068#c2).

pinskia pointed me here and I fear I might be hitting this as a result of dwz
optimised debug info on gcc (as it's the only recent change I can think of).

Anyway, this seems to help indeed:

--- a/libgcc/config/i386/linux-unwind.h
+++ b/libgcc/config/i386/linux-unwind.h
@@ -60,6 +60,11 @@ x86_64_fallback_frame_state (struct _Unwind_Context
*context,
 #else
 #define RT_SIGRETURN_SYSCALL   0x050f4201c0c7ULL
 #endif
+
+  /* Defend against corrupted PC, PR66874 */
+  if ((unsigned long)pc < 4096)
+return _URC_END_OF_STACK;
+
   if (*(unsigned char *)(pc+0) == 0x48
   && *(unsigned long long *)(pc+1) == RT_SIGRETURN_SYSCALL)
 {

I've only shoved it in quickly to be able to debug something else so it's not
really ready to submit.

[Bug target/66874] RFE: x86_64_fallback_frame_state more robust

2024-02-23 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66874

--- Comment #4 from Sam James  ---
I was just going off "incorrect debug info" in comment 0 given it's the only
thing I changed recently. If not, then I've got no idea.

If I were sure it were dwz, I'd file a bug there ;)

[Bug middle-end/114099] New: [14 regression] ICE when building darktable-4.6.1

2024-02-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114099

Bug ID: 114099
   Summary: [14 regression] ICE when building darktable-4.6.1
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: middle-end
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57525
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57525&action=edit
PentaxDecompressor.cpp.ii

This was found after applying the patch from PR114068. I can hit it without too
though.

Initially reported downstream in Gentoo by tdr.

```
$ gcc -c PentaxDecompressor.cpp.ii -O3 -march=sapphirerapids -std=c++20
during GIMPLE pass: vect
/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1/src/external/rawspeed/src/librawspeed/decompressors/PentaxDecompressor.cpp:
In static member function ‘static
rawspeed::HuffmanCode
rawspeed::PentaxDecompressor::SetupPrefixCodeDecoder_Modern(rawspeed::ByteStream)’:
/var/tmp/portage/media-gfx/darktable-4.6.1/work/darktable-4.6.1/src/external/rawspeed/src/librawspeed/decompressors/PentaxDecompressor.cpp:81:1:
internal compiler error: Segmentation fault
0x55743ad30b10 crash_signal
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/toplev.cc:319
0x55743bb50b1f find_uses_to_rename_use
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-loop-manip.cc:414
0x55743bb50b1f find_uses_to_rename_bb(basic_block_def*, bitmap_head**,
bitmap_head*, int) [clone .constprop.0]
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-loop-manip.cc:489
0x55743b993aed find_uses_to_rename
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-loop-manip.cc:521
0x55743b993aed rewrite_into_loop_closed_ssa_1
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-loop-manip.cc:588
0x55743b993aed rewrite_into_loop_closed_ssa(bitmap_head*, unsigned int)
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-ssa-loop-manip.cc:628
0x55743bd1e8d9 execute
   
/usr/src/debug/sys-devel/gcc-14.0./gcc-14.0./gcc/tree-vectorizer.cc:1360
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See  for instructions.
```

  1   2   3   4   5   6   7   8   9   10   >