[Bug tree-optimization/109274] [13 Regression] ice in in_chain_p, at gimple-range-gori.cc:119 starting with r13-6787-g0963cb5fde158cce986

2023-03-28 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109274

Sam James  changed:

   What|Removed |Added

 CC||sam at gentoo dot org

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

[Bug tree-optimization/109325] ICE in range_def_chain::in_chain_ when building opencv

2023-03-28 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109325

Sam James  changed:

   What|Removed |Added

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

--- Comment #3 from Sam James  ---
(In reply to Andrew Pinski from comment #2)
> Most likely a dup of bug 109274.

Yeah, patch works and indeed looks identical. Thanks.

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

[Bug tree-optimization/109325] ICE in range_def_chain::in_chain_ when building opencv

2023-03-28 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109325

--- Comment #1 from Sam James  ---
Created attachment 54781
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54781=edit
warpers.cpp.ii.xz

Originally reported by Adrien Dessemond  at
https://bugs.gentoo.org/903505.

```
x86_64-pc-linux-gnu-g++ -m32 -mfpmath=sse -DCVAPI_EXPORTS -D_USE_MATH_DEFINES
-D__OPENCV_BUILD=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
-D__STDC_LIMIT_MACROS
-I/var/tmp/portage/media-libs/opencv-4.7.0/work/opencv-4.7.0/modules/stitching/include
-I/var/tmp/portage/media-libs/opencv-4.7.0/work/opencv-4.7.0_build-abi_x86_32.x86/modules/stitching
-I/var/tmp/portage/media-libs/opencv-4.7.0/work/opencv-4.7.0/modules/core/include
-I/var/tmp/portage/media-libs/opencv-4.7.0/work/opencv-4.7.0/modules/flann/include
-I/var/tmp/portage/media-libs/opencv-4.7.0/work/opencv-4.7.0/modules/imgproc/include
-I/var/tmp/portage/media-libs/opencv-4.7.0/work/opencv-4.7.0/modules/features2d/include
-I/var/tmp/portage/media-libs/opencv-4.7.0/work/opencv-4.7.0/modules/calib3d/include
-isystem
/var/tmp/portage/media-libs/opencv-4.7.0/work/opencv-4.7.0_build-abi_x86_32.x86
-isystem /usr/include/eigen3  -O2 -pipe -march=native
-fdiagnostics-color=always -frecord-gcc-switches -Wreturn-type -ggdb3  
-fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress
-Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef
-Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized
-Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment
-Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option
-pthread -fomit-frame-pointer -ffunction-sections -fdata-sections  -msse -msse2
-msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mf16c -mfma -mavx -mfpmath=sse
-fvisibility=hidden -fvisibility-inlines-hidden -fopenmp -std=c++11 -fPIC
-fdiagnostics-color=always -c warpers.cpp.ii
during GIMPLE pass: vrp
In file included from
/var/tmp/portage/media-libs/opencv-4.7.0/work/opencv-4.7.0/modules/stitching/include/opencv2/stitching/detail/warpers.hpp:704,
 from
/var/tmp/portage/media-libs/opencv-4.7.0/work/opencv-4.7.0/modules/stitching/include/opencv2/stitching/warpers.hpp:46,
 from
/var/tmp/portage/media-libs/opencv-4.7.0/work/opencv-4.7.0/modules/stitching/include/opencv2/stitching.hpp:48,
 from
/var/tmp/portage/media-libs/opencv-4.7.0/work/opencv-4.7.0/modules/stitching/src/precomp.hpp:59,
 from
/var/tmp/portage/media-libs/opencv-4.7.0/work/opencv-4.7.0/modules/stitching/src/warpers.cpp:43:
/var/tmp/portage/media-libs/opencv-4.7.0/work/opencv-4.7.0/modules/stitching/include/opencv2/stitching/detail/warpers_inl.hpp:
In member function ‘void
cv::detail::RotationWarperBase::detectResultRoiByBorder(cv::Size,
cv::Point&, cv::Point&) [with P = cv::detail::SphericalProjector]’:
/var/tmp/portage/media-libs/opencv-4.7.0/work/opencv-4.7.0/modules/stitching/include/opencv2/stitching/detail/warpers_inl.hpp:185:6:
internal compiler error: Segmentation fault
  185 | void RotationWarperBase::detectResultRoiByBorder(Size src_size,
Point _tl, Point _br)
  |  ^
0xd80b07 crash_signal
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/toplev.cc:314
0x1688195 range_def_chain::in_chain_p(tree_node*, tree_node*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/gimple-range-gori.cc:126
0x1683fb0 gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/gimple-range-gori.cc:667
0x1688ae9 gori_compute::compute_operand1_range(vrange&,
gimple_range_op_handler&, vrange const&, tree_node*, fur_source&,
value_relation*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/gimple-range-gori.cc:1174
0x1683599 gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/gimple-range-gori.cc:726
0x16bdcb8 gori_compute::compute_operand2_range(vrange&,
gimple_range_op_handler&, vrange const&, tree_node*, fur_source&,
value_relation*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/gimple-range-gori.cc:1254
0x18050a9 gori_compute::compute_operand1_and_operand2_range(vrange&,
gimple_range_op_handler&, vrange const&, tree_node*, fur_source&,
value_relation*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/gimple-range-gori.cc:1274
0x168409f gori_compute::compute_operand_range(vrange&, gimple*, vrange const&,
tree_node*, fur_source&, value_relation*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/gimple-range-gori.cc:723
0x1682e5a gori_compute::outgoing_edge_range_p(vrange&, edge_def*, tree_node*,
range_query&)
   

[Bug tree-optimization/109325] New: ICE in range_def_chain::in_chain_ when building opencv

2023-03-28 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109325

Bug ID: 109325
   Summary: ICE in range_def_chain::in_chain_ when building opencv
   Product: gcc
   Version: 13.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sam at gentoo dot org
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu
Target: x

[Bug tree-optimization/109304] ICE when building Python 3.12.0_alpha6 (internal compiler error: in get_vrange, at value-range-storage.cc:87)

2023-03-27 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109304

--- Comment #2 from Sam James  ---
Good: 13.0.1 20230319
Bad: 13.0.1 20230326

I'll bisect now but someone is free to beat me.

[Bug c/109304] ICE when building Python 3.12.0_alpha6 (internal compiler error: in get_vrange, at value-range-storage.cc:87)

2023-03-27 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109304

--- Comment #1 from Sam James  ---
Created attachment 54772
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54772=edit
reduced.i

```
$ x86_64-pc-linux-gnu-gcc -c /tmp/reduced.i -fprofile-generate -O3
-fno-semantic-interposition -fPIC
/tmp/reduced.i:1:1: warning: data definition has no type or storage class
1 | PyUnicode_FindChar_i;
  | ^~~~
/tmp/reduced.i:1:1: warning: type defaults to ‘int’ in declaration of
‘PyUnicode_FindChar_i’ [-Wimplicit-int]
/tmp/reduced.i:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
2 | PyUnicode_FindChar() {
  | ^~
during GIMPLE pass: unswitch
/tmp/reduced.i: In function ‘PyUnicode_FindChar’:
/tmp/reduced.i:2:1: internal compiler error: in get_vrange, at
value-range-storage.cc:87
0x828a6f vrange_storage::get_vrange(void const*, vrange&, tree_node*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/value-range-storage.cc:87
0x828a6f vrange_storage::get_vrange(void const*, vrange&, tree_node*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/value-range-storage.cc:72
0x828a6f range_info_get_range(tree_node*, vrange&)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-ssanames.cc:121
0x828a6f duplicate_ssa_name_range_info(tree_node*, tree_node*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-ssanames.cc:750
0x15ca96a duplicate_ssa_name_fn(function*, tree_node*, gimple*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-ssanames.cc:771
0x15ca96a duplicate_ssa_name(tree_node*, gimple*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-ssanames.h:115
0x15ca96a create_new_def_for(tree_node*, gimple*, tree_node**)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-into-ssa.cc:3091
0x15c96cd gimple_duplicate_bb
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-cfg.cc:6555
0x15c8cd5 duplicate_block(basic_block_def*, edge_def*, basic_block_def*,
copy_bb_data*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/cfghooks.cc:1117
0x15c842e copy_bbs(basic_block_def**, unsigned int, basic_block_def**,
edge_def**, unsigned int, edge_def**, loop*, basic_block_def*, bool)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/cfghooks.cc:1382
0x15fe319 duplicate_loop_body_to_header_edge(loop*, edge_def*, unsigned int,
simple_bitmap_def*, edge_def*, vec*, int)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/cfgloopmanip.cc:1235
0x15fdc4b gimple_duplicate_loop_body_to_header_edge(loop*, edge_def*, unsigned
int, simple_bitmap_def*, edge_def*, vec*, int)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-ssa-loop-manip.cc:861
0x175c533 loop_version(loop*, void*, basic_block_def**, profile_probability,
profile_probability, profile_probability, profile_probability, bool)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/cfgloopmanip.cc:1630
0xcf6c7b tree_unswitch_loop
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-ssa-loop-unswitch.cc:1117
0xcf6c7b tree_unswitch_single_loop
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-ssa-loop-unswitch.cc:1055
0xcf85ed tree_ssa_unswitch_loops(function*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-ssa-loop-unswitch.cc:385
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 c/109304] New: ICE when building Python 3.12.0_alpha6 (internal compiler error: in get_vrange, at value-range-storage.cc:87)

2023-03-27 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109304

Bug ID: 109304
   Summary: ICE when building Python 3.12.0_alpha6 (internal
compiler error: in get_vrange, at
value-range-storage.cc:87)
   Product: gcc
   Version: 13.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sam at gentoo dot org
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
 Build: x86_64-pc-linux-gnu

Created attachment 54771
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54771=edit
unicodeobject.i.xz

Just hit this with this week's gcc 13 (13.0.1 20230326). Last week's was fine.

```
$ x86_64-pc-linux-gnu-gcc -c ./unicodeobject.i -fprofile-generate -O3
-fno-semantic-interposition -fPIC
during GIMPLE pass: unswitch
Objects/unicodeobject.c: In function ‘_PyUnicode_XStrip’:
Objects/unicodeobject.c:11613:1: internal compiler error: in get_vrange, at
value-range-storage.cc:87
0x828a6f vrange_storage::get_vrange(void const*, vrange&, tree_node*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/value-range-storage.cc:87
0x828a6f vrange_storage::get_vrange(void const*, vrange&, tree_node*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/value-range-storage.cc:72
0x828a6f range_info_get_range(tree_node*, vrange&)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-ssanames.cc:121
0x828a6f duplicate_ssa_name_range_info(tree_node*, tree_node*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-ssanames.cc:750
0x15ca96a duplicate_ssa_name_fn(function*, tree_node*, gimple*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-ssanames.cc:771
0x15ca96a duplicate_ssa_name(tree_node*, gimple*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-ssanames.h:115
0x15ca96a create_new_def_for(tree_node*, gimple*, tree_node**)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-into-ssa.cc:3091
0x15c96cd gimple_duplicate_bb
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-cfg.cc:6555
0x15c8cd5 duplicate_block(basic_block_def*, edge_def*, basic_block_def*,
copy_bb_data*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/cfghooks.cc:1117
0x15c84d2 copy_bbs(basic_block_def**, unsigned int, basic_block_def**,
edge_def**, unsigned int, edge_def**, loop*, basic_block_def*, bool)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/cfghooks.cc:1382
0x15fe319 duplicate_loop_body_to_header_edge(loop*, edge_def*, unsigned int,
simple_bitmap_def*, edge_def*, vec*, int)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/cfgloopmanip.cc:1235
0x15fdc4b gimple_duplicate_loop_body_to_header_edge(loop*, edge_def*, unsigned
int, simple_bitmap_def*, edge_def*, vec*, int)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-ssa-loop-manip.cc:861
0x175c533 loop_version(loop*, void*, basic_block_def**, profile_probability,
profile_probability, profile_probability, profile_probability, bool)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/cfgloopmanip.cc:1630
0xcf6c7b tree_unswitch_loop
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-ssa-loop-unswitch.cc:1117
0xcf6c7b tree_unswitch_single_loop
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-ssa-loop-unswitch.cc:1055
0xcf85ed tree_ssa_unswitch_loops(function*)
   
/usr/src/debug/sys-devel/gcc-13.0.1_pre20230326/gcc-13-20230326/gcc/tree-ssa-loop-unswitch.cc:385
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
```

[Bug target/109140] ICE (during RTL pass: internal compiler error: in extract_insn, at recog.cc:2791) when building qemu on sparc64-unknown-linux-gnu with -march=niagara4

2023-03-16 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140

Sam James  changed:

   What|Removed |Added

 CC||davem at davemloft dot net

--- Comment #11 from Sam James  ---
Thank you for the extremely thorough bisect!

[Bug target/109140] ICE (during RTL pass: internal compiler error: in extract_insn, at recog.cc:2791) when building qemu on sparc64-unknown-linux-gnu with -march=niagara4

2023-03-15 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140

Sam James  changed:

   What|Removed |Added

  Known to work||11.3.1
  Known to fail||12.2.1

--- Comment #4 from Sam James  ---
so far:
11.3.1 20230303 is OK.
12.2.1 20230304 isn't.

[Bug target/109140] ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4

2023-03-15 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140

--- Comment #3 from Sam James  ---
I'll bisect later but someone is free to beat me if they want. I think 11 was
fine, but need to check.

[Bug target/109140] ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4

2023-03-15 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140

--- Comment #2 from Sam James  ---
Created attachment 54670
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54670=edit
reduced.i

Attached reduced version.

```
# sparc64-unknown-linux-gnu-gcc reduced.i -O2 -mcpu=niagara4 -c
reduced.i:3:1: warning: no semicolon at end of struct or union
3 | } LMIValue;
  | ^
reduced.i:6:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
6 | helper_pcmpgtb() {
  | ^~
reduced.i: In function ‘helper_pcmpgtb’:
reduced.i:10:1: error: unrecognizable insn:
   10 | }
  | ^
(insn 24 23 25 2 (set (reg:DI 130)
(unspec:DI [
(gtu:V8QI (reg:V8QI 125)
(reg:V8QI 119))
] UNSPEC_FUCMP)) "reduced.i":9:55 -1
 (nil))
during RTL pass: vregs
reduced.i:10:1: internal compiler error: in extract_insn, at recog.cc:2791
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See  for instructions.
```

[Bug target/109140] ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4

2023-03-15 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140

--- Comment #1 from Sam James  ---
Created attachment 54669
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54669=edit
target_mips_tcg_lmmi_helper.c.i.xz

[Bug target/109140] New: ICE when building qemu (qemu-user, MIPS component) on sparc64-unknown-linux-gnu with -march=niagara4

2023-03-15 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109140

Bug ID: 109140
   Summary: ICE when building qemu (qemu-user, MIPS component) on
sparc64-unknown-linux-gnu with -march=niagara4
   Product: gcc
   Version: 13.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sam at gentoo dot org
  Target Milestone: ---
  Host: sparc64-unknown-linux-gnu
Target: sparc64-unknown-linux-gnu
 Build: sparc64-unknown-linux-gnu

Hit when building QEMU 7.2.0's qemu-user component for mips on sparc64. This
one is reproducible with cross.

It needs -O2 -mcpu=niagara4 at least and -O2 -march=ultrasparc is fine.

```
$ sparc64-unknown-linux-gnu-gcc target_mips_tcg_lmmi_helper.c.i -O2
-mcpu=niagara4 -c
../target/mips/tcg/lmmi_helper.c: In function ‘helper_pcmpgtb’:
../target/mips/tcg/lmmi_helper.c:554:1: error: unrecognizable insn:
(insn 9 8 10 2 (set (reg:DI 118)
(unspec:DI [
(ltu:V8QI (subreg:V8QI (reg/v:DI 115 [ ft ]) 0)
(subreg:V8QI (reg/v:DI 114 [ fs ]) 0))
] UNSPEC_FUCMP)) "../target/mips/tcg/lmmi_helper.c":551:18 -1
 (nil))
during RTL pass: vregs
../target/mips/tcg/lmmi_helper.c:554:1: internal compiler error: in
extract_insn, at recog.cc:2791
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See  for instructions.

$ sparc64-unknown-linux-gnu-gcc --version
sparc64-unknown-linux-gnu-gcc (Gentoo Hardened 12.2.1_p20230304 p13) 12.2.1
20230304
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
```

Attached the preprocessed source, not yet reduced or bisected, but I'll be
doing both later.

[Bug target/109137] [12/13 regression] Compiling ffmpeg with -m32 on x86_64-pc-linux-gnu hangs on libavcodec/h264_cabac.c since r12-9086-g489c81db7d4f75

2023-03-14 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109137

--- Comment #6 from Sam James  ---
(In reply to Andrew Pinski from comment #5)
> The inline-asm inside get_cabac_inline_x86 needs 7 registers (6 + ecx is
> used as a clobber). So obviously it will be really bad on 32bit x86.

Ah, thanks, I get it. It looks like this actually came up before in
https://trac.ffmpeg.org/ticket/8903 and
https://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=8990c5869e27fcd43b53045f87ba251f42e7d293;hp=c64d56a2f53455f803456811873ff08fce98e122
but they just disabled it for Clang?

[Bug c/109137] [12/13 regression] Compiling ffmpeg with -m32 on x86_64-pc-linux-gnu hangs on libavcodec/h264_cabac.c since r12-9086-g489c81db7d4f75

2023-03-14 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109137

--- Comment #2 from Sam James  ---
(I suspect ffmpeg's build system does some
buffering/synchronisation/suppression of output until a job is complete which
is why it looks like a hang with no output at all, while running it manually
gets errors-then-hang.)

[Bug c/109137] [12/13 regression] Compiling ffmpeg with -m32 on x86_64-pc-linux-gnu hangs on libavcodec/h264_cabac.c since r12-9086-g489c81db7d4f75

2023-03-14 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109137

--- Comment #1 from Sam James  ---
Created attachment 54667
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54667=edit
h264_cabac.i

With the attached h264_cebac.i:
- gcc-11 -m32 -c h264_cabac.i -O3 -march=znver1 # works
- gcc-12 -m32 -c h264_cabac.i -O3 -march=znver1 # errors-then-hangs
- gcc-13 -m32 -c h264_cabac.i -O3 -march=znver1 # errors-then-hangs

The .i is generated by GCC 12.

[Bug c/109137] New: [12/13 regression] Compiling ffmpeg with -m32 on x86_64-pc-linux-gnu hangs on libavcodec/h264_cabac.c since r12-9086-g489c81db7d4f75

2023-03-14 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109137

Bug ID: 109137
   Summary: [12/13 regression] Compiling ffmpeg with -m32 on
x86_64-pc-linux-gnu hangs on libavcodec/h264_cabac.c
since r12-9086-g489c81db7d4f75
   Product: gcc
   Version: 13.0
   URL: https://bugs.gentoo.org/900937
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sam at gentoo dot org
CC: hubicka at gcc dot gnu.org
  Target Milestone: ---

Building ffmpeg for multilib (32-bit x86 on amd64, i.e. x86_64-pc-linux-gnu
-m32) hangs when using -O3 -march=znver1 on libavcodec/h264_cabac.c.

Notes:
- Originally reported downstream in Gentoo at https://bugs.gentoo.org/900937.
- 12.2.1 20230121 is good
- 12.2.1 20230304 is bad
- 13.0.1 20230312 is bad
- Seems to bisect to r12-9086-g489c81db7d4f75
- Needs CFLAGS="-O3 -march=znver1" to trigger

The bisect result 489c81db7d4f75894e9d34aa90fe7224cfafb53a
(r12-9086-g489c81db7d4f75) doesn't revert cleanly on tip of releases/gcc-12 so
I haven't been able to confirm that bit yet.

>From `ps faux`:
```
sam  3394612  5.1  0.0  23596 19736 pts/11   SN+  00:19   0:02  |   |  
\_ make -j32 -l32 V=1
sam  3399918  0.0  0.0   8180  3612 pts/11   SN+  00:20   0:00  |   |  
\_ //usr/bin/x86_64-pc-linux-gnu-gcc -m32 -mfpmath=sse -I.
-Isrc/ -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -DPIC -DHAVE_AV_CONFIG_H
-DBUILDING_avcodec -march=znver1 -O3 -Werror=implicit-function-declaration
-Werror=implicit-int -Wreturn-type -Wformat -Wint-conversion -Waddress
-Warray-bounds -Wfree-nonheap-object -Wimplicit-function-declaration
-Wimplicit-int -Wincompatible-pointer-types -Wint-conversion
-Wint-to-pointer-cast -Wmain -Wnonnull -Wodr -Wparentheses -Wreturn-type
-Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstring-compare -Wuninitialized
-Wunused-value -Wvarargs -march=znver1 -std=c11 -fPIC
-Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith
-Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes
-Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body -Wno-parentheses
-Wno-switch -Wno-format-zero-length -Wno-pointer-sign
-Wno-unused-const-variable -Wno-bool-operation -Wno-char-subscripts
-march=znver1 -O3 -Werror=implicit-function-declaration -Werror=implicit-int
-Wreturn-type -Wformat -Wint-conversion -Waddress -Warray-bounds
-Wfree-nonheap-object -Wimplicit-function-declaration -Wimplicit-int
-Wincompatible-pointer-types -Wint-conversion -Wint-to-pointer-cast -Wmain
-Wnonnull -Wodr -Wparentheses -Wreturn-type -Wsizeof-pointer-memaccess
-Wstrict-aliasing -Wstring-compare -Wuninitialized -Wunused-value -Wvarargs
-fno-math-errno -fno-signed-zeros -fno-tree-vectorize -Werror=format-security
-Werror=implicit-function-declaration -Werror=missing-prototypes
-Werror=return-type -Werror=vla -Wformat -Wno-maybe-uninitialized -MMD -MF
libavcodec/h264_cabac.d -MT libavcodec/h264_cabac.o -c -o
libavcodec/h264_cabac.o src/libavcodec/h264_cabac.c
sam  3399921  100  0.1 109632 88364 pts/11   RN+  00:20   0:43  |   |  
\_ /usr/libexec/gcc/x86_64-pc-linux-gnu/13/cc1 -quiet -I .
-I src/ -imultilib 32 -MMD libavcodec/h264_cabac.d -MF libavcodec/h264_cabac.d
-MT libavcodec/h264_cabac.o -D _ISOC99_SOURCE -D _FILE_OFFSET_BITS=64 -D
_LARGEFILE_SOURCE -D _POSIX_C_SOURCE=200112 -D _XOPEN_SOURCE=600 -D PIC -D
HAVE_AV_CONFIG_H -D BUILDING_avcodec src/libavcodec/h264_cabac.c -quiet
-dumpdir libavcodec/ -dumpbase h264_cabac.c -dumpbase-ext .c -m32 -mfpmath=sse
-march=znver1 -O3 -O3 -Werror=implicit-function-declaration
-Werror=implicit-int -Wformat=1 -Warray-bounds=1 -Wdeclaration-after-statement
-Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings
-Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast
-Wstrict-prototypes -Wempty-body -Wno-switch -Wno-format-zero-length
-Wno-pointer-sign -Wunused-const-variable=0 -Wno-bool-operation
-Wno-char-subscripts -Werror=implicit-function-declaration -Werror=implicit-int
-Wformat=1 -Waddress -Warray-bounds=1 -Wfree-nonheap-object
-Wimplicit-function-declaration -Wimplicit-int -Wincompatible-pointer-types
-Wint-conversion -Wint-to-pointer-cast -Wmain -Wnonnull -Wodr -Wparentheses
-Wreturn-type -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstring-compare
-Wuninitialized -Wunused-value -Wvarargs -Werror=format-security
-Werror=implicit-function-declaration -Werror=missing-prototypes
-Werror=return-type -Werror=vla -Wformat=1 -Wno-maybe-uninitialized -std=c11
-fPIC -fno-math-errno -fno-signed-zeros -fno-tree-vectorize -o
/var/tmp/portage/media-video/ffmpeg-4.4.3/temp/cc7EadEm.s
```

---

Now, if I try to run it by itself, I get:
```
# /usr/bin/x86_64-pc-linux-gnu-gcc-12 -m32 

[Bug tree-optimization/108379] -Wmaybe-uninitialized false positive on conditional use

2023-03-05 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108379

Sam James  changed:

   What|Removed |Added

 CC||eggert at cs dot ucla.edu

--- Comment #4 from Sam James  ---
tee -P is now in coreutils git. Paul's applied
https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=0789451237b90324a5d1f5c1b9fbaa5099f4c072
as a workaround to avoid this warning.

[Bug target/106609] [12 Regression] sh3eb-elf cross compiler is being miscompiled since r12-1525-g3155d51bfd1de8b6c4645

2023-02-28 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106609

Sam James  changed:

   What|Removed |Added

 CC||sam at gentoo dot org

--- Comment #16 from Sam James  ---
so just needs a 12 backport?

[Bug tree-optimization/108691] [13 Regression] ICE with function ptr and setjmp/returns twice at -O1

2023-02-21 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108691

--- Comment #13 from Sam James  ---
(Revert was for pr108868).

[Bug ipa/107931] [12/13 Regression] -Og causes always_inline to fail since r12-6677-gc952126870c92cf2

2023-02-17 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107931

--- Comment #9 from Sam James  ---
For completeness, this originated from
https://github.com/Perl/perl5/issues/19776, I believe.

[Bug c/101682] gcc incorrectly rejects C2x attributes after declaration-specifiers

2023-02-14 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101682

Sam James  changed:

   What|Removed |Added

 CC||sam at gentoo dot org

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

[Bug c/108796] GCC 13 accepts [[noreturn]] attribute without -std=c2x

2023-02-14 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108796

Sam James  changed:

   What|Removed |Added

 Resolution|INVALID |DUPLICATE

--- Comment #3 from Sam James  ---


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

[Bug c/108796] GCC 13 accepts [[noreturn]] attribute without -std=c2x

2023-02-14 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108796

--- Comment #2 from Sam James  ---
Sorry, for completeness, I meant to include:
```
$ gcc-12 -O2 /tmp/foo.c # ditto with -std=c89
/tmp/foo.c:3:1: warning: 'noreturn' attribute ignored [-Wattributes]
3 | [[noreturn]] void foo(void) {
  | ^
``

[Bug c/108796] GCC 13 accepts [[noreturn]] attribute without -std=c2x

2023-02-14 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108796

Sam James  changed:

   What|Removed |Added

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

--- Comment #1 from Sam James  ---
I asked on #gcc and this is intentional, it seems.

[Bug c/108796] New: GCC 13 accepts [[noreturn]] attribute without -std=c2x

2023-02-14 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108796

Bug ID: 108796
   Summary: GCC 13 accepts [[noreturn]] attribute without -std=c2x
   Product: gcc
   Version: 13.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sam at gentoo dot org
  Target Milestone: ---

Created attachment 54462
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54462=edit
foo.i

GCC 13 (13.0.1 20230212) seems to accept [[noreturn]] as an attribute even when
not in C2x mode. This leads to a build failure with sudo-1.9.13
(https://github.com/sudo-project/sudo/issues/239) since
https://github.com/sudo-project/sudo/commit/e707ffe58b3ccfe5c72f54c38eac1d7069d5021e.

Clang 16.0.0_rc2 does not accept it unless passing -std=c2x.

Is this intentional or not? Thanks.

foo.c:
```
#include 

[[noreturn]] void foo(void) {
abort();
}

int main() {
foo();
}
```

```
$ gcc-13 --version
gcc-13 (Gentoo Hardened 13.0.1_pre20230212 p8) 13.0.1 20230212 (experimental)
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ gcc-13 -std=c2x -O2 /tmp/foo.c # fine
$ gcc-13 -std=c99 -O2 /tmp/foo.c # fine
$ gcc-13 -O2 /tmp/foo.c -o /tmp/foo # fine

$ clang-16 --version
clang version 16.0.0 # actually 16.0.0_rc2
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/16/bin
Configuration file: /etc/clang/clang.cfg

$ clang-16 -O2 /tmp/foo.c -o /tmp/foo
/tmp/foo.c:3:2: error: expected expression
[[noreturn]] void foo(void) {
 ^
/tmp/foo.c:3:14: error: expected identifier or '('
[[noreturn]] void foo(void) {
 ^
/tmp/foo.c:8:2: error: call to undeclared function 'foo'; ISO C99 and later do
not support implicit function declarations [-Wimplicit-function-declaration]
foo();
^
3 errors generated.

$ clang-16 -std=c2x -O2 /tmp/foo.c -o /tmp/foo # fine
```

[Bug ipa/108695] [13 Regression] Wrong code since r13-5215-gb1f30bf42d8d47 for dd_rescue package

2023-02-08 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108695

--- Comment #11 from Sam James  ---
Can you drop a link in here if/when reported upstream? Thanks

[Bug c/108690] -Wstrict-prototypes too picky for C23

2023-02-07 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108690

--- Comment #2 from Sam James  ---
Please add https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108694 to See Also.

[Bug target/108484] [13 Regression] ICE building glibc for ia64 in cselib_subst_to_values, at cselib.cc:2148

2023-02-02 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108484

--- Comment #7 from Sam James  ---
Could you add 108463 to See Also? Thanks.

[Bug plugins/108634] [13 regression] 'undefined symbol: tree_code_type' when building kernel GCC plugins since r13-5431-gb0241ce6e37031

2023-02-01 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108634

--- Comment #4 from Sam James  ---
Patch sent to kernel:
https://lore.kernel.org/linux-hardening/20230201230009.2252783-1-...@gentoo.org/T/#u

[Bug plugins/108634] [13 regression] 'undefined symbol: tree_code_type' when building kernel GCC plugins since r13-5431-gb0241ce6e37031

2023-02-01 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108634

Sam James  changed:

   What|Removed |Added

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

--- Comment #2 from Sam James  ---
Oh, I see - I missed that bit --  I didn't realise they were passing anything
at all. Let's take it up on the kernel side then.

[Bug plugins/108634] New: [13 regression] 'undefined symbol: tree_code_type' when building kernel GCC plugins since r13-5431-gb0241ce6e37031

2023-02-01 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108634

Bug ID: 108634
   Summary: [13 regression] 'undefined symbol: tree_code_type'
when building kernel GCC plugins since
r13-5431-gb0241ce6e37031
   Product: gcc
   Version: 13.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: plugins
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sam at gentoo dot org
CC: jakub at gcc dot gnu.org
  Target Milestone: ---

When building kernel 6.1.9:
```
cc1: error: cannot load plugin
./scripts/gcc-plugins/randomize_layout_plugin.so:
./scripts/gcc-plugins/randomize_layout_plugin.so: undefined symbol:
tree_code_type
make[2]: ***
[/var/tmp/portage/sys-kernel/gentoo-kernel-6.1.9/work/linux-6.1/scripts/Makefile.build:118:
scripts/mod/devicetable-offsets.s] Error 1
make[2]: *** Waiting for unfinished jobs
make[2]: ***
[/var/tmp/portage/sys-kernel/gentoo-kernel-6.1.9/work/linux-6.1/scripts/Makefile.build:250:
scripts/mod/empty.o] Error 1
make[1]: ***
[/var/tmp/portage/sys-kernel/gentoo-kernel-6.1.9/work/linux-6.1/Makefile:1281:
prepare0] Error 2
make[1]: *** Waiting for unfinished jobs
make: *** [Makefile:231: __sub-make] Error 2
```

This happens since r13-5431-gb0241ce6e37031 which changes the visibility
(thanks to Arsen and pinskia for spotting this) of some of the symbols.

It's unclear to me if this is a kernel or GCC issue though (should the kernel
be using different methods in its plugin?)

[Bug c/108531] Imaginary types are not supported, violating ISO C Annex G

2023-01-24 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108531

--- Comment #4 from Sam James  ---
LLVM side: https://github.com/llvm/llvm-project/issues/60269

[Bug c/107048] GCC lacks -fsanitize=kcfi

2023-01-23 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107048

--- Comment #2 from Sam James  ---
See https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608723.html and so
on. kees mentioned this is currently in review and a new version is being spun
up.

[Bug target/103100] [11/12/13 Regression] unaligned access generated with memset or {} and -O2 -mstrict-align

2023-01-22 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103100

--- Comment #16 from Sam James  ---
(In reply to felix from comment #15)

He means apinski who submitted a patch, not you.

[Bug target/55522] -funsafe-math-optimizations is unexpectedly harmful, especially w/ -shared

2023-01-12 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522

--- Comment #33 from Sam James  ---
(In reply to Richard Biener from comment #32)
> Do other targets want to follow suite for GCC 13 here?

I think the deviation for x86 and !x86 as-is will lead to further confusion.

[Bug tree-optimization/108379] -Wmaybe-uninitialized false positive on conditional use

2023-01-11 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108379

--- Comment #2 from Sam James  ---
Minimum command needed to reproduce:
```
$ gcc-13 -Werror -Wuninitialized -O2 -c tee.i
src/tee.c: In function 'tee_files':
src/tee.c:272:25: error: 'out_pollable' may be used uninitialized
[-Werror=maybe-uninitialized]
src/tee.c:238:8: note: 'out_pollable' was declared here
cc1: all warnings being treated as errors
```

[Bug tree-optimization/108379] -Wmaybe-uninitialized false positive on conditional use

2023-01-11 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108379

--- Comment #1 from Sam James  ---
Created attachment 54252
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54252=edit
coreutils-tee.patch

[Bug tree-optimization/108379] New: -Wmaybe-uninitialized false positive on conditional use

2023-01-11 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108379

Bug ID: 108379
   Summary: -Wmaybe-uninitialized false positive on conditional
use
   Product: gcc
   Version: 13.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sam at gentoo dot org
  Target Milestone: ---

Created attachment 54251
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54251=edit
tee.i

Occurs when applying a patch to coreutils on top of its git repo at
7fc84d1c0f6b35231b0b4577b70aaa26bf548a7c (attached for completeness):
```
gcc-13  -I. -I./lib  -Ilib -I./lib -Isrc -I./src  -Werror -fno-common -Wall
-Warith-conversion -Wbad-function-cast -Wcast-align=strict -Wdate-time
-Wdisabled-optimization -Wdouble-promotion -Wduplicated-branches
-Wduplicated-cond -Wextra -Wformat-signedness -Winit-self -Winvalid-pch
-Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes
-Wnull-dereference -Wold-style-definition -Wopenmp-simd -Woverlength-strings
-Wpacked -Wpointer-arith -Wshadow -Wstrict-overflow -Wstrict-prototypes
-Wsuggest-attribute=cold -Wsuggest-attribute=const -Wsuggest-attribute=format
-Wsuggest-attribute=malloc -Wsuggest-attribute=noreturn
-Wsuggest-attribute=pure -Wsuggest-final-methods -Wsuggest-final-types
-Wsync-nand -Wtrampolines -Wuninitialized -Wunknown-pragmas -Wunused-macros
-Wvariadic-macros -Wvla -Wwrite-strings -Warray-bounds=2 -Wattribute-alias=2
-Wbidi-chars=any,ucn -Wformat=2 -Wimplicit-fallthrough=5 -Wshift-overflow=2
-Wuse-after-free=3 -Wunused-const-variable=2 -Wvla-larger-than=4031
-Wno-sign-compare -Wno-unused-parameter -Wno-format-nonliteral
-fdiagnostics-show-option -funit-at-a-time -Wno-return-local-addr -g -O2 -MT
src/tee.o -MD -MP -MF $depbase.Tpo -c -o src/tee.o src/tee.c &&\
mv -f $depbase.Tpo $depbase.Po
src/tee.c: In function 'tee_files':
src/tee.c:272:25: error: 'out_pollable' may be used uninitialized
[-Werror=maybe-uninitialized]
  272 | out_pollable[i] = iopoll_output_ok (fileno (descriptors[i]));
  | ^~~~
src/tee.c:238:9: note: 'out_pollable' was declared here
  238 |   bool *out_pollable;
  | ^~~~
cc1: all warnings being treated as errors
```

Reproduced with both GCC 12.2.1 20230107 and GCC 13.0.0 20230108.

Attached preprocessed source.

[Bug target/93082] macOS Authorization.h needs fixinclude

2023-01-06 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93082

--- Comment #14 from Sam James  ---
This seems to be fixed in the latest macOS SDK (13.1 at least). But obviously
that doesn't help folks who need to use older SDKs.

[Bug ipa/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2023-01-02 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

--- Comment #10 from Sam James  ---
Both Arsen and I gave it a go and it doesn't seem to make a difference either
way (it doesn't induce miscompilation with the revert, and it doesn't fix
miscompilation without the revert).

[Bug ipa/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2022-12-28 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

--- Comment #6 from Sam James  ---
For completeness, I should note, because some commits couldn't be built (only a
handful), git said (I've converted the commits) that it could be any of:
r12-5382-g616ca1024a79c6
r12-5383-g22c242342e38eb
r12-5381-g53c964ad996a1b
r12-5384-g3535be6c6f4409
r12-5380-g75ac95f6647367
r12-5385-g6f4ac4f81f89ca

I then verified it's r12-5383-g22c242342e38eb by going back to releases/gcc-12
and retrying a few times by applying/reverting it, but maybe there's something
useful in this list anyway.

[Bug ipa/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2022-12-28 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

--- Comment #5 from Sam James  ---
(In reply to Andrew Pinski from comment #4)
> Do you know which object file inside llvm-tblgen is being miscompiled?
> You can do a binary search on object files and then provide the preprocessed
> source for that one.

Will try find out.

> 
> Also could you reproduce the miscompiling with reverting and with
> -fdump-ipa-all ? I suspect you could ...

No, interestingly, it works (no hangs) if I use -fdump-ipa-all in the flags to
build LLVM. I double checked as I was a bit surprised.

[Bug c/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2022-12-28 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

--- Comment #3 from Sam James  ---
Flags used to build LLVM:
export FFLAGS='-O2 -mcpu=powerpc -mtune=powerpc -pipe'
export CXXFLAGS='-O2 -mcpu=powerpc -mtune=powerpc -pipe -ggdb
-D_GLIBCXX_ASSERTIONS=1'
export LDFLAGS='-Wl,-O1 -Wl,--as-needed'
export FCFLAGS='-O2 -mcpu=powerpc -mtune=powerpc -pipe'
export CFLAGS='-O2 -mcpu=powerpc -mtune=powerpc -pipe -ggdb'

LLVM was built at llvm-project.git commit
a4e3457fb752d675c58fb14a3d8ed03fe218b6b0
for the bisect.

_GLIBCXX_ASSERTIONS seemed to make the miscompilation more likely, anecdotally,
but
the original bug reported in Gentoo didn't have this set, and I reproduced the
hang
without it. But it seems more likely to happen when it's set.

[Bug c/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2022-12-28 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

--- Comment #2 from Sam James  ---
LLVM build with working llvm-tblgen (with gcc revert as described above):
https://dev.gentoo.org/~sam/bugs/gcc/gcc-llvm-tblgen-ppc/bisect-maybe-broken-2022-12-28-no-hang-revert.tar.xz

LLVM build with broken llvm-tblgen (at releases/gcc-12 as described above):
https://dev.gentoo.org/~sam/bugs/gcc/gcc-llvm-tblgen-ppc/bisect-maybe-broken-2022-12-28-hangs.tar.xz

Within both tarballs, the bad binary is at bin/llvm-tblgen.

[Bug c/108250] [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2022-12-28 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

--- Comment #1 from Sam James  ---
GCC built at releases/gcc-12 at a3fbfc1027e9edcd14bb290b5702504d80d9e8fe with a
revert of 22c242342e38ebffa6bbf7e86e7a1e4abdf0d686 which produces a working
llvm-tblgen:
```
$ gcc-12 -V
Using built-in specs.
COLLECT_GCC=gcc-12
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/powerpc-unknown-linux-gnu/12/lto-wrapper
Target: powerpc-unknown-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-12.3./work/gcc-12.3./configure
--host=powerpc-unknown-linux-gnu --build=powerpc-unknown-linux-gnu
--prefix=/usr --bindir=/usr/powerpc-unknown-linux-gnu/gcc-bin/12
--includedir=/usr/lib/gcc/powerpc-unknown-linux-gnu/12/include
--datadir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/12
--mandir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/12/man
--infodir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/12/info
--with-gxx-include-dir=/usr/lib/gcc/powerpc-unknown-linux-gnu/12/include/g++-v12
--with-python-dir=/share/gcc-data/powerpc-unknown-linux-gnu/12/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=release
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 12.2.1, commit
a00a9de1ca2ed3d1740715a1a4824908350b21c0' --with-gcc-major-version-only
--disable-esp --enable-libstdcxx-time --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--disable-multilib --disable-fixed-point --enable-targets=all --enable-libgomp
--disable-libssp --disable-libada --disable-cet --disable-systemtap
--disable-valgrind-annotations --disable-vtable-verify --disable-libvtv
--without-zstd --enable-lto --without-isl --enable-default-pie
--enable-default-ssp --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.2.1 20221227 (Gentoo 12.2.1, commit
a00a9de1ca2ed3d1740715a1a4824908350b21c0)
```

GCC built at releases/gcc-12 at a3fbfc1027e9edcd14bb290b5702504d80d9e8fe which
produces a broken llvm-tblgen:
```
$ gcc-12 -V
Using built-in specs.
COLLECT_GCC=gcc-12
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/powerpc-unknown-linux-gnu/12/lto-wrapper
Target: powerpc-unknown-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-12.3./work/gcc-12.3./configure
--host=powerpc-unknown-linux-gnu --build=powerpc-unknown-linux-gnu
--prefix=/usr --bindir=/usr/powerpc-unknown-linux-gnu/gcc-bin/12
--includedir=/usr/lib/gcc/powerpc-unknown-linux-gnu/12/include
--datadir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/12
--mandir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/12/man
--infodir=/usr/share/gcc-data/powerpc-unknown-linux-gnu/12/info
--with-gxx-include-dir=/usr/lib/gcc/powerpc-unknown-linux-gnu/12/include/g++-v12
--with-python-dir=/share/gcc-data/powerpc-unknown-linux-gnu/12/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=release
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 12.2.1, commit
a3fbfc1027e9edcd14bb290b5702504d80d9e8fe' --with-gcc-major-version-only
--disable-esp --enable-libstdcxx-time --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--disable-multilib --disable-fixed-point --enable-targets=all --enable-libgomp
--disable-libssp --disable-libada --disable-cet --disable-systemtap
--disable-valgrind-annotations --disable-vtable-verify --disable-libvtv
--without-zstd --enable-lto --without-isl --enable-default-pie
--enable-default-ssp --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.2.1 20221227 (Gentoo 12.2.1, commit
a3fbfc1027e9edcd14bb290b5702504d80d9e8fe)
```

[Bug c/108250] New: [12/13 regression] llvm-tblgen miscompiled on powerpc-unknown-linux-gnu since r12-5383-g22c242342e38eb

2022-12-28 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250

Bug ID: 108250
   Summary: [12/13 regression] llvm-tblgen miscompiled on
powerpc-unknown-linux-gnu since
r12-5383-g22c242342e38eb
   Product: gcc
   Version: 13.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sam at gentoo dot org
CC: marxin at gcc dot gnu.org
  Target Milestone: ---
  Host: powerpc-unknown-linux-gnu
Target: powerpc-unknown-linux-gnu
 Build: powerpc-unknown-linux-gnu

Originally reported downstream in Gentoo at https://bugs.gentoo.org/880677. I
forwarded it to LLVM at https://github.com/llvm/llvm-project/issues/59698 too.

With GCC 12 and newer, llvm-tblgen (which is built as part of the LLVM build
process and used for part of the build) is miscompiled on
powerpc-unknown-linux-gnu. GCC 11 and older are fine.

It has two failure modes:
1. When producing a description for the PPC target in LLVM as:
```
bin/llvm-tblgen -I ~/llvm-project/llvm/lib/TargetPowerPC \
-I ~/llvm-project/llvm/include/ \
-I ~/llvm-project/llvm/lib/Target/PowerPC/ \
~/llvm-project/llvm/lib/Target/PowerPC/PPC.td \
-o /dev/null \
--gen-dag-isel \
-d /dev/null \
--time-phases \
--write-if-changed
```
it'll regularly hang (not on all runs, but if you run it 10 times, it'll hang
for several of them).
2. For X86, it'll give invalid output which later causes the LLVM compilation
to fail.

For the purposes of tracking down which GCC commit caused it, we bisected by
checking for timeouts in a loop. The result was r12-5383-g22c242342e38eb.

Reverting 22c242342e38ebffa6bbf7e86e7a1e4abdf0d686 on top of releases/gcc-12
(at a3fbfc1027e9edcd14bb290b5702504d80d9e8fe) results in a built llvm-tblgen
which doesn't hang.

Please let me know what further information you require. Access to the
environment is also available (it's purely a testing machine for this kind of
bug, no personal data on it).

[Bug c/108224] Suggest stdlib.h header for rand

2022-12-25 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108224

Sam James  changed:

   What|Removed |Added

 CC||sam at gentoo dot org

--- Comment #4 from Sam James  ---
(In reply to Jonny Grant from comment #3)
> Great! I just saw it is the same for random(), srandom(), initstate(),
> setstate()
> 
> Is there an easy way to add them all based on the C API to save opening
> separate tickets?
> 
> I added those :

Could you send the patch to gcc-patches (the mailing list)? Thanks.

[Bug target/108208] Bad assembly? on large LLVM source files on powerpc-unknown-linux-gnu (Error: operand out of range)

2022-12-23 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108208

--- Comment #1 from Sam James  ---
Ah, based on https://bugzilla.redhat.com/show_bug.cgi?id=427700#c3 &
https://bugzilla.redhat.com/show_bug.cgi?id=427700#c5, maybe the source really
does just need splitting.

[Bug target/108208] New: Build failure on large LLVM source files on PPC

2022-12-23 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108208

Bug ID: 108208
   Summary: Build failure on large LLVM source files on PPC
   Product: gcc
   Version: 13.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sam at gentoo dot org
  Target Milestone: ---

We've seen this a few times in Gentoo when building LLVM, but this is the
latest case.

```
$ gcc --version
gcc (Gentoo 13.0.0_pre20221218 p5) 13.0.0 20221218 (experimental)
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```

```
/usr/bin/c++ -save-temps -O2 -g -pipe -fsanitize=undefined -std=c++17 -fPIC
-fno-semantic-interposition -fvisibility-inlines-hidden -ffunction-sections
-fdata-sections  -fno-exceptions -fno-rtti RegisterInfoEmitter.cpp.ii
[...]
a-RegisterInfoEmitter.cpp.s:577996: Error: operand out of range
(0x9d8c is not between 0x8000 and 0x7fff)
a-RegisterInfoEmitter.cpp.s:578007: Error: operand out of range
(0x9d10 is not between 0x8000 and 0x7fff)
a-RegisterInfoEmitter.cpp.s:578016: Error: operand out of range
(0x9d18 is not between 0x8000 and 0x7fff)
a-RegisterInfoEmitter.cpp.s:578024: Error: operand out of range
(0x9d14 is not between 0x8000 and 0x7fff)
a-RegisterInfoEmitter.cpp.s:578042: Error: operand out of range
(0x9d84 is not between 0x8000 and 0x7fff)
a-RegisterInfoEmitter.cpp.s:578061: Error: operand out of range
(0x9d5c is not between 0x8000 and 0x7fff)
a-RegisterInfoEmitter.cpp.s:578071: Error: operand out of range
(0x9d68 is not between 0x8000 and 0x7fff)
[...]
```

I've uploaded gcc-RegisterInfoEmitter-ppc.tar.xz at
https://dev.gentoo.org/~sam/bugs/gcc/gcc-RegisterInfoEmitter-ppc/gcc-RegisterInfoEmitter-ppc.tar.xz
(because of the size of the files) which contains:
```
-rw-r--r--  1 root root 2.8M Dec 23 10:35
gcc-RegisterInfoEmitter-ppc/RegisterInfoEmitter.cpp.ii
-rw-r--r--  1 root root  42M Dec 23 10:45
gcc-RegisterInfoEmitter-ppc/a-RegisterInfoEmitter.cpp.s
```

Minimising is hard because it only happens with large source files and it's
also time consuming to compile and get the error.

(Sorry for external link, it's too big even when compressed to attach here, as
it's 4MB.)

[Bug rust/108087] -Wodr warnings in rust/rust-lang.cc (lang_type)

2022-12-13 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108087

--- Comment #1 from Sam James  ---
Sorry, output got mangled slightly by ansifiltering:
```
/var/tmp/portage/sys-devel/gcc-13.0./work/gcc-13.0./gcc/rust/rust-lang.cc:67:17:
warning: type ‘struct lang_type’ violates the C++ One Definition Rule [-Wodr]
   67 | struct GTY (()) lang_type
  | ^
/var/tmp/portage/sys-devel/gcc-13.0./work/gcc-13.0./gcc/rust/backend/rust-tree.h:234:
note: a different type is defined in another translation unit
  234 | struct GTY (()) lang_type
  |
/var/tmp/portage/sys-devel/gcc-13.0./work/gcc-13.0./gcc/rust/backend/rust-tree.h:236:
note: the first difference of corresponding definitions is field ‘align’
  236 |   unsigned char align;
  |
/var/tmp/portage/sys-devel/gcc-13.0./work/gcc-13.0./gcc/rust/backend/rust-tree.h:234:
note: a type with different number of fields is defined in another translation
unit
  234 | struct GTY (()) lang_type
  |
```

[Bug rust/108087] New: -Wodr warnings in rust/rust-lang.cc (lang_type)

2022-12-13 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108087

Bug ID: 108087
   Summary: -Wodr warnings in rust/rust-lang.cc (lang_type)
   Product: gcc
   Version: 13.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: rust
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sam at gentoo dot org
CC: dkm at gcc dot gnu.org, gcc-rust at gcc dot gnu.org
  Target Milestone: ---

Created attachment 54082
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54082=edit
build.log.xz (slightly past warning)

Noticed when bootstrapping GCC 13 from trunk at r13-4681-g531ca06c007d4c.
```
/var/tmp/portage/sys-devel/gcc-13.0./work/gcc-13.0./gcc/rust/rust-lang.cc:67:17:
warning: type [-Wodr]
   67 | struct GTY (()) lang_type
  | ^
/var/tmp/portage/sys-devel/gcc-13.0./work/gcc-13.0./gcc/rust/backend/rust-tree.h:234:
note: a different type is defined in another translation unit
  234 | struct GTY (()) lang_type
  |
/var/tmp/portage/sys-devel/gcc-13.0./work/gcc-13.0./gcc/rust/backend/rust-tree.h:236:
note: the first difference of corresponding definitions is field ‘align’
  236 |   unsigned char align;
  |
/var/tmp/portage/sys-devel/gcc-13.0./work/gcc-13.0./gcc/rust/backend/rust-tree.h:234:
note: a type with different number of fields is defined in another translation
unit
  234 | struct GTY (()) lang_type
  |
```

I've attached the build.log compressed a bit past the point of the warning, as
it's still building.

Host compiler is 12.2.1_p20221210.

[Bug driver/108022] [11/12/13 regression] -frecord-gcc-switches doesn't record preprocessor macros since r11-5739-g7caa49706316e6

2022-12-08 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108022

Sam James  changed:

   What|Removed |Added

Summary|[11/12/13 regression]   |[11/12/13 regression]
   |-frecord-gcc-switches   |-frecord-gcc-switches
   |doesn't record preprocessor |doesn't record preprocessor
   |macros since|macros since
   |7caa49706316e650fb67719e1a1 |r11-5739-g7caa49706316e6
   |bf3a35054b685   |

--- Comment #1 from Sam James  ---
(it's r11-5739-g7caa49706316e6).

[Bug driver/108022] New: [11/12/13 regression] -frecord-gcc-switches doesn't record preprocessor macros since 7caa49706316e650fb67719e1a1bf3a35054b685

2022-12-08 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108022

Bug ID: 108022
   Summary: [11/12/13 regression] -frecord-gcc-switches doesn't
record preprocessor macros since
7caa49706316e650fb67719e1a1bf3a35054b685
   Product: gcc
   Version: 12.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: driver
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sam at gentoo dot org
CC: marxin at gcc dot gnu.org
  Target Milestone: ---

-frecord-gcc-switches seems to have stopped recording preprocessor flags passed
on the command line between GCC 10 and GCC 11.

```
$ cat test.c
#include 

int main(void) {
printf("%s", "hi\n");
}
$ gcc-10 -frecord-gcc-switches -D_TEST_SAVE_CPPFLAGS test.c -o ~/test &&
objdump -s test | grep -i TEST_SAVE
  2d44205f 54455354 5f534156 455f4350  -D _TEST_SAVE_CP
$ gcc-11 -frecord-gcc-switches -D_TEST_SAVE_CPPFLAGS test.c -o ~/test &&
objdump -s test | grep -i TEST_SAVE
```

10.4.1 (20221201) is fine
11.3.1 (20221202) is not

gcc 12 and gcc 13 also have the same regression from gcc 10 (they don't work).
Manually inspecting 'objdump -s test' doesn't show -DD_TEST_SAVE_CPPFLAGS
either (it's not an issue with how the string is chunked).

I ran a bisect overnight and it looks like the culprit is:
```
7caa49706316e650fb67719e1a1bf3a35054b685 is the first bad commit
commit 7caa49706316e650fb67719e1a1bf3a35054b685
Author: Martin Liska 
Date:   Mon Nov 23 13:40:04 2020 +0100

Refactor -frecord-gcc-switches.

gcc/ChangeLog:

* doc/tm.texi: Change argument of the record_gcc_switches
hook and remove SWITCH_TYPE_* enum values.
* dwarf2out.c (gen_producer_string): Move to opts.c and remove
handling of the dwarf_record_gcc_switches option.
(dwarf2out_early_finish): Use moved gen_producer_string
function.
* opts.c (gen_producer_string): New.
* opts.h (gen_producer_string): New.
* target.def: Change type of record_gcc_switches.
* target.h (enum print_switch_type): Remove.
(elf_record_gcc_switches): Change first argument.
* toplev.c (MAX_LINE): Remove.
(print_to_asm_out_file):  Likewise.
(print_to_stderr): Likewise.
(print_single_switch): Likewise.
(print_switch_values): Likewise.
(init_asm_output): Use new gen_producer_string function.
(process_options): Likewise.
* varasm.c (elf_record_gcc_switches): Just save the string argument
to the ELF container.

 gcc/doc/tm.texi |  38 +---
 gcc/dwarf2out.c | 118 +++--
 gcc/opts.c  | 119 ++
 gcc/opts.h  |   6 ++
 gcc/target.def  |  38 +---
 gcc/target.h|  14 +
 gcc/toplev.c| 176 ++--
 gcc/varasm.c|  48 
 8 files changed, 166 insertions(+), 391 deletions(-)
```

I haven't tried reverting it yet as it doesn't revert cleanly on master.

[Bug lto/107078] LTO is causing that firebird build is core dumping

2022-12-05 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107078

--- Comment #22 from Sam James  ---
(In reply to Tomasz Kłoczko from comment #21)
> On emore time.
> You are commenting under GNU C Compilet issue during linking firebird
> binaries linking.
> *COMPILER* (not firebird) is core dumping.
> 
> Please discuss firebird issue opening ticket on
> https://github.com/FirebirdSQL/firebird/issues/

It is definitely isql which is segfaulting. The Makefile uses a binary just
built to try do some bits and the binary-just-built crashes.

[Bug sanitizer/107963] Support __attribute__((disable_sanitizer_instrumentation))

2022-12-04 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107963

Sam James  changed:

   What|Removed |Added

 CC||sam at gentoo dot org

--- Comment #2 from Sam James  ---
(In reply to Andrew Pinski from comment #1)
> https://gcc.gnu.org/pipermail/gcc/2021-November/237787.html
> 
> If I read this correctly, there is no reason for a new attribute for gcc.

Sounds like a possible documentation issue then.

[Bug lto/107078] LTO is causing that firebird build is core dumping

2022-12-03 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107078

Sam James  changed:

   What|Removed |Added

 CC||sam at gentoo dot org

--- Comment #19 from Sam James  ---
I get some ODR warnings in gpre:
```
/tmp/firebird/Firebird-4.0.2.2816-0/src/gpre/pat.cpp:60:21: warning: type
‘struct ops’ violates the C++ One Definition Rule [-Wodr]
   60 | static const struct ops
  | ^
/tmp/firebird/Firebird-4.0.2.2816-0/src/gpre/sqe.cpp:124:8: note: a different
type is defined in another translation unit
  124 | struct ops
  |^
/tmp/firebird/Firebird-4.0.2.2816-0/src/gpre/pat.cpp:62:15: note: the first
difference of corresponding definitions is field ‘ops_type’
   62 | pat_t ops_type;
  |   ^
/tmp/firebird/Firebird-4.0.2.2816-0/src/gpre/sqe.cpp:126:15: note: a field with
different name is defined in another translation unit
  126 | nod_t rel_op;
  |   ^
lto-wrapper: warning: using serial compilation of 11 LTRANS jobs
lto-wrapper: note: see the ‘-flto’ option documentation for more information
rm -f /tmp/firebird/Firebird-4.0.2.2816-0/gen/Release/firebird/bin/gpre_current
```

--

Anyway, as a hack, try this:
```
diff --git a/gen/Makefile b/gen/Makefile
index a121c31..8eabd44 100644
--- a/gen/Makefile
+++ b/gen/Makefile
@@ -438,7 +438,7 @@ yachts.lnk: metadata.fdb

 metadata.fdb:  $(RUN_ISQL) $(SRC_ROOT)/dbs/metadata.sql
-$(RM) $@
-   $(RUN_ISQL) -q -i $(SRC_ROOT)/dbs/metadata.sql
+   gdbserver 127.0.0.1:1234 -- $(RUN_ISQL) -q -i
$(SRC_ROOT)/dbs/metadata.sql
$(RUN_GFIX) -mode read_only $@
$(CHMOD) 0444 $@

@@ -467,9 +467,9 @@ security.fdb:   $(SRC_ROOT)/dbs/security.sql

 msg.timestamp: $(MSG_FILES)
-$(RM) msg.fdb
-   echo create database \'msg.fdb\'\; | $(RUN_ISQL)
+   echo create database \'msg.fdb\'\; | gdbserver 127.0.0.1:1235 --
$(RUN_ISQL)
$(RUN_GFIX) -write async msg.fdb
-   for sql in $(MSG_FILES); do (echo $$sql; $(RUN_ISQL) -i $$sql msg.fdb)
|| exit; done
+   for sql in $(MSG_FILES); do (echo $$sql; gdbserver 127.0.0.1:1236 --
$(RUN_ISQL) -i $$sql msg.fdb) || exit; done
$(TOUCH) $@


```

[Bug c/107730] Trivial -Wreturn-type false positive when function marked static

2022-11-16 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107730

Sam James  changed:

   What|Removed |Added

 Status|RESOLVED|CLOSED

--- Comment #3 from Sam James  ---
hm, wait, sorry. It should still emit the warning even without static? Or am I
missing something?

[Bug c/107730] Trivial -Wreturn-type false positive when function marked static

2022-11-16 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107730

Sam James  changed:

   What|Removed |Added

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

--- Comment #2 from Sam James  ---
oh, duh, I'd missed the *.

[Bug c/107730] Trivial -Wreturn-type false positive when function marked static

2022-11-16 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107730

--- Comment #1 from Sam James  ---
Note that if I drop 'static', the warning goes away. Clang does not warn at
all.

[Bug c/107730] New: Trivial -Wreturn-type false positive when function marked static

2022-11-16 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107730

Bug ID: 107730
   Summary: Trivial -Wreturn-type false positive when function
marked static
   Product: gcc
   Version: 12.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sam at gentoo dot org
  Target Milestone: ---

Created attachment 53915
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53915=edit
foo.i

```
#include 

static void *poll_logfiles(int n) {
for (;;) {
sleep(1);
}
}

int main() {
poll_logfiles(0);
}
```

```
$ gcc-9.5.0 /tmp/foo.c -Wreturn-type
/tmp/foo.c: In function 'poll_logfiles':
/tmp/foo.c:7:1: warning: no return statement in function returning non-void
[-Wreturn-type]
7 | }
  | ^

# 10.4.1_p20221110
$ gcc-10 /tmp/foo.c -Wreturn-type
/tmp/foo.c: In function 'poll_logfiles':
/tmp/foo.c:7:1: warning: no return statement in function returning non-void
[-Wreturn-type]
7 | }
  | ^

# 11.3.1_p2022
$ gcc-11 /tmp/foo.c -Wreturn-type
/tmp/foo.c: In function 'poll_logfiles':
/tmp/foo.c:7:1: warning: no return statement in function returning non-void
[-Wreturn-type]
7 | }
  | ^

# 12.2.1_p20221112
$ gcc-12 /tmp/foo.c -Wreturn-type
/tmp/foo.c: In function ‘poll_logfiles’:
/tmp/foo.c:7:1: warning: no return statement in function returning non-void
[-Wreturn-type]
7 | }
  | ^

# 13.0.0_pre20221113
$ gcc-13 /tmp/foo.c -Wreturn-type
/tmp/foo.c: In function 'poll_logfiles':
/tmp/foo.c:7:1: warning: no return statement in function returning non-void
[-Wreturn-type]
7 | }
  | ^
```

[Bug analyzer/106854] [[gnu::malloc(deallocator)]] for non-pointer functions (e.g., fd)

2022-11-13 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106854

Sam James  changed:

   What|Removed |Added

 CC||ericb at gcc dot gnu.org

--- Comment #8 from Sam James  ---
Something similarish came up with gnutls recently:
https://gitlab.com/gnutls/gnutls/-/merge_requests/1652#note_1138078435.

[Bug target/104688] gcc and libatomic can use SSE for 128-bit atomic loads on Intel CPUs with AVX

2022-11-13 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104688

--- Comment #11 from Sam James  ---
(In reply to GGanesh from comment #10)
> Can we extend this patch to AMD processors as well. If not, I will plan to
> submit the patch for stage-1!

GCC 13 (as of today) is in stage 3 - see https://gcc.gnu.org/develop.html, but
it may or may not still be possible to submit it (not my call).

[Bug target/107568] Bootstrap failure on macOS 12.6 (monterey)

2022-11-09 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107568

Sam James  changed:

   What|Removed |Added

 CC||iains at gcc dot gnu.org

--- Comment #4 from Sam James  ---
See also Iain's bug at https://github.com/iains/gcc-darwin-arm64/issues/98.

[Bug c/107583] New: Missing fixit for struct members (e.g. time_t, missing include)

2022-11-08 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107583

Bug ID: 107583
   Summary: Missing fixit for struct members (e.g. time_t, missing
 include)
   Product: gcc
   Version: 12.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sam at gentoo dot org
  Target Milestone: ---

Created attachment 53855
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53855=edit
a-foo.i

```
$ cat /tmp/foo.c
struct foo {
time_t mytime; /* missing  include should trigger fixit */
}

$ gcc /tmp/foo.c
foo.c:2:9: error: unknown type name 'time_t'
2 | time_t mytime; /* missing  include should trigger fixit
*/
  | ^~
foo.c:3:1: error: expected identifier or '(' at end of input
3 | }
  | ^
```

```
# gcc --version
gcc (Gentoo 12.2.1_p20221008 p1) 12.2.1 20221008
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```

Expected output is a  "fixit" like:
```
test.c:3:13: error: unknown type name 'time_t'
3 | void myfunc(time_t test) {
  | ^~
test.c:2:1: note: 'time_t' is defined in header ''; did you forget to
'#include '?
1 | #include 
  +++ |+#include 
2 |
```

[Bug c/82922] Request: add -Wstrict-prototypes to -Wextra as K style is obsolescent

2022-11-08 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82922

--- Comment #12 from Sam James  ---
GCC lacks an equivalent for Clang's -Wdeprecated-non-prototype, right?

[Bug c/82922] Request: add -Wstrict-prototypes to -Wextra as K style is obsolescent

2022-11-08 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82922

--- Comment #10 from Sam James  ---
(In reply to David Brown from comment #9)
> Could -Wstrict-prototypes be added to -Wall, or even considered enabling by
> default?  The next C standard will make "void foo()" mean the same as "void
> foo(void)", like in C++, which makes the scope for confusion high.

Yes please, given Clang has done this (or essentially this, and added its own
-Wdeprecated-non-prototype):
- https://lwn.net/Articles/913505/
-
https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213
-
https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240

Anything which makes it easier to spot things which are going to become fatal
in future is a good idea. Otherwise we'll have a headache now with Clang and a
headache in a few years when defaults shift to c23.

[Bug c++/78014] -Wformat -vs- size_t

2022-10-18 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78014

--- Comment #8 from Sam James  ---
FWIW, the Clang counterpart to this bug is
https://github.com/llvm/llvm-project/issues/41959.

[Bug c/91092] Error on implicit function declarations by default

2022-09-12 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91092

--- Comment #21 from Sam James  ---
Followers of this bug may be interested to learn:
1. Clang has made this change in LLVM 15 (as well as some other related
changes:
https://releases.llvm.org/15.0.0/tools/clang/docs/ReleaseNotes.html#improvements-to-clang-s-diagnostics);

2. There's discussion ongoing at
https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213
wrt the breakage to configure scripts.

[Bug other/106899] Snapshots do not contain pre-generated man pages & info pages

2022-09-09 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106899

--- Comment #3 from Sam James  ---
Yeah, I understand it's not an error per se, just wondering if it could be
considered to add them.

It looks like they're generated from the same script used for releases:
maintainer-scripts/gcc_release (as it handles announcing them too, and diffs,
etc).

I didn't realise it didn't do a test build at all (figured if it did, could
just shove in --enable-generated-files-in-srcdir).

At least the machinery is largely there, but it'd involve actually doing at
least a minimal build before generating the snapshots.

[Bug other/106899] New: Snapshots do not contain pre-generated man pages & info pages

2022-09-09 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106899

Bug ID: 106899
   Summary: Snapshots do not contain pre-generated man pages &
info pages
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: other
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sam at gentoo dot org
  Target Milestone: ---

Would it be possible for the weekly snapshots to include pre-generated .info
pages (and man pages)?

Full releases do:
```
# find . | grep -i "\.info$"
./gcc-11.3.0/libquadmath/libquadmath.info
./gcc-11.3.0/libgomp/libgomp.info
./gcc-11.3.0/libitm/libitm.info
./gcc-11.3.0/gcc/fortran/gfortran.info
./gcc-11.3.0/gcc/doc/gccinstall.info
./gcc-11.3.0/gcc/doc/gccint.info
./gcc-11.3.0/gcc/doc/cpp.info
./gcc-11.3.0/gcc/doc/cppinternals.info
./gcc-11.3.0/gcc/doc/gcc.info
```

But snapshots don't:
```
/var/tmp/portage/sys-devel/gcc-11.3.1_p20220909/work # find . | grep -i
"\.info$"
/var/tmp/portage/sys-devel/gcc-11.3.1_p20220909/work #
```

[Bug target/55522] -funsafe-math-optimizations is unexpectedly harmful, especially w/ -shared

2022-09-06 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55522

--- Comment #14 from Sam James  ---
(In reply to Andrew Pinski from comment #13)
> Patient: Doctor it hurts when I do this.
> Doctor: then don't do that and if you read the instructions I gave you I
> told you I would hurt this way.
> 

This response could be applied to any bug asking for a change in behaviour of a
command line option. But I accept it's been a long time.

[Bug target/106458] [12/13 Regression] glibc's malloc/tst-scratch_buffer.c test is miscompiled with gcc-12

2022-07-30 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106458

--- Comment #7 from Sam James  ---
Thanks Dave. I'd seen this failure when testing glibc 2.36 but hadn't looked
into it more (too warm to keep machine on).

[Bug target/68485] ICE while building gpsd package on microblaze

2022-07-30 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68485

Sam James  changed:

   What|Removed |Added

 CC||sam at gentoo dot org

--- Comment #12 from Sam James  ---
Ajit doesn't seem to have a Bugzilla account.

[Bug debug/106431] Hang when compiling large printf() file (from glibc's tst-printf-bz18872) on HPPA with -ggdb3

2022-07-25 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106431

--- Comment #5 from Sam James  ---
Created attachment 53349
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53349=edit
a-foo.i.xz

[Bug debug/106431] Hang when compiling large printf() file (from glibc's tst-printf-bz18872) on HPPA with -ggdb3

2022-07-25 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106431

--- Comment #3 from Sam James  ---
Ah, nice! It's substantially faster (5 seconds) with -fno-var-tracking.

Do you need me to try anything else?

[Bug c/106431] Hang when compiling large printf() file (from glibc's tst-printf-bz18872) on HPPA with -ggdb3

2022-07-24 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106431

--- Comment #1 from Sam James  ---
(Ignore the comment about `as` hanging, that's just a side-effect of -pipe,
which I didn't clock at first.)

[Bug c/106431] New: Hang when compiling large printf() file (from glibc's tst-printf-bz18872) on HPPA with -ggdb3

2022-07-24 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106431

Bug ID: 106431
   Summary: Hang when compiling large printf() file (from glibc's
tst-printf-bz18872) on HPPA with -ggdb3
   Product: gcc
   Version: 11.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sam at gentoo dot org
  Target Milestone: ---

Created attachment 53343
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53343=edit
tst-printf-bz18872.c

tst-printf-bz18872.c

Dumped my initial thoughts at https://bugs.gentoo.org/860819 when found this.

The hang only occurs on a native compiler so far (not cross). Happy to give
access to a machine used for Gentoo testing to aid debugging. Requires -ggdb3
at least, possibly other debugging levels too.

Compiles quickly without -ggdb3 (e.g. hppa2.0-unknown-linux-gnu-gcc -pipe
-march=2.0 -fdiagnostics-show-option -O2 -Wl,-O1 -Wl,--as-needed foo.c).

Noticed when building glibc's test suite on hppa2.0-unknown-linux-gnu and
compilation hanged on:
```
hppa2.0-unknown-linux-gnu-gcc  -pipe -march=2.0 -fdiagnostics-show-option
-ggdb3 -O2 -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu
/var/tmp/portage/sys-libs/glibc-/work/build-hppa-hppa2.0-unknown-linux-gnu-nptl/stdio-common/tst-printf-bz18872.c
-c -std=gnu11 -fgnu89-inline  -pipe -march=2.0 -fdiagnostics-show-option -ggdb3
-O2 -Wall -Wwrite-strings -Wundef -fmerge-all-constants -frounding-math
-fno-stack-protector -fno-common -Wstrict-prototypes -Wold-style-definition
-fmath-errno-fno-pie  -U_FORTIFY_SOURCE   -I../include
-I/var/tmp/portage/sys-libs/glibc-/work/build-hppa-hppa2.0-unknown-linux-gnu-nptl/stdio-common

-I/var/tmp/portage/sys-libs/glibc-/work/build-hppa-hppa2.0-unknown-linux-gnu-nptl
 -I../sysdeps/unix/sysv/linux/hppa  -I../sysdeps/hppa/nptl 
-I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux 
-I../sysdeps/nptl  -I../sysdeps/pthread  -I../sysdeps/gnu 
-I../sysdeps/unix/inet  -I../sysdeps/unix/sysv  -I../sysdeps/unix 
-I../sysdeps/posix  -I../sysdeps/hppa/hppa1.1  -I../sysdeps/wordsize-32 
-I../sysdeps/ieee754/flt-32  -I../sysdeps/ieee754/dbl-64  -I../sysdeps/hppa/fpu
 -I../sysdeps/hppa  -I../sysdeps/ieee754  -I../sysdeps/generic  -I.. -I../libio
-I. -nostdinc -isystem /usr/lib/gcc/hppa2.0-unknown-linux-gnu/11.3.0/include
-isystem /usr/lib/gcc/hppa2.0-unknown-linux-gnu/11.3.0/include-fixed -isystem
/usr/include -D_LIBC_REENTRANT -include
/var/tmp/portage/sys-libs/glibc-/work/build-hppa-hppa2.0-unknown-linux-gnu-nptl/libc-modules.h
-DMODULE_NAME=testsuite -include ../include/libc-symbols.h  -DPIC
-DTOP_NAMESPACE=glibc -D_IO_MTSAFE_IO -o
/var/tmp/portage/sys-libs/glibc-/work/build-hppa-hppa2.0-unknown-linux-gnu-nptl/stdio-common/tst-printf-bz18872.o
-MD -MP -MF
/var/tmp/portage/sys-libs/glibc-/work/build-hppa-hppa2.0-unknown-linux-gnu-nptl/stdio-common/tst-printf-bz18872.o.dt
-MT
/var/tmp/portage/sys-libs/glibc-/work/build-hppa-hppa2.0-unknown-linux-gnu-nptl/stdio-common/tst-printf-bz18872.o
```

As far as I can tell, GCC invokes `as` and then it hangs indefinitely.

I can reproduce this outside of glibc's test suite with the attached file:
```
$ hppa2.0-unknown-linux-gnu-gcc -pipe -march=2.0 -g -O2 -Wl,-O1 -Wl,--as-needed
foo.c -v
Using built-in specs.
COLLECT_GCC=hppa2.0-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/hppa2.0-unknown-linux-gnu/11.2.1/lto-wrapper
Target: hppa2.0-unknown-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-11.2.1_p20220115/work/gcc-11-20220115/configure
--host=hppa2.0-unknown-linux-gnu --build=hppa2.0-unknown-linux-gnu
--prefix=/usr --bindir=/usr/hppa2.0-unknown-linux-gnu/gcc-bin/11.2.1
--includedir=/usr/lib/gcc/hppa2.0-unknown-linux-gnu/11.2.1/include
--datadir=/usr/share/gcc-data/hppa2.0-unknown-linux-gnu/11.2.1
--mandir=/usr/share/gcc-data/hppa2.0-unknown-linux-gnu/11.2.1/man
--infodir=/usr/share/gcc-data/hppa2.0-unknown-linux-gnu/11.2.1/info
--with-gxx-include-dir=/usr/lib/gcc/hppa2.0-unknown-linux-gnu/11.2.1/include/g++-v11
--with-python-dir=/share/gcc-data/hppa2.0-unknown-linux-gnu/11.2.1/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=release
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo
11.2.1_p20220115 p4' --disable-esp --enable-libstdcxx-time
--disable-libstdcxx-pch --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --disable-multilib
--disable-fixed-point --enable-libgomp --disable-libssp --disable-libada
--disable-cet --disable-systemtap --disable-valgrind-annotations
--disable-vtable-verify --disable-libvtv --without-zstd --enable-lto
--without-isl --disable-libsanitizer --enable-default-pie --disable-default-ssp
Thread model: posix
Supported LTO 

[Bug c++/106230] ICE when building folly-2022.07.04.00 in pop_local_binding (cp/name-lookup.cc:2474)

2022-07-08 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106230

--- Comment #3 from Sam James  ---
Clang does build with the original (folly) if I don't preprocess it.

[Bug c++/106230] ICE when building folly-2022.07.04.00 in pop_local_binding (cp/name-lookup.cc:2474)

2022-07-08 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106230

--- Comment #2 from Sam James  ---
Ignore me on the last part re Clang. It doesn't build there either with the
reduced version or original because of fortify bits.

[Bug c++/106230] ICE when building folly-2022.07.04.00 in pop_local_binding (cp/name-lookup.cc:2474)

2022-07-08 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106230

--- Comment #1 from Sam James  ---
Created attachment 53275
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53275=edit
ccHXKhJc.ii (minimised reproducer)

I think I need to re-run cvise because the minimised version doesn't build with
Clang, but the original does.

For the reduced version:
```
$ g++ -c ccHXKhJc.ii
ccHXKhJc.ii: In static member function ‘static bool
TypeParameterizedTest::Register()’:
ccHXKhJc.ii:19:67: warning: no return statement in function returning non-void
[-Wreturn-type]
   19 |   static bool Register() { new typename TestSel::Bind::type; }
  |   ^
ccHXKhJc.ii: In static member function ‘static bool
TypeParameterizedTestSuite::Register()’:
ccHXKhJc.ii:24:3: warning: no return statement in function returning non-void
[-Wreturn-type]
   24 |   }
  |   ^
ccHXKhJc.ii: In instantiation of ‘void atomic_fetch_flip_basic(Op) [with
 = int;  = short int; Op =
with_order]’:
ccHXKhJc.ii:49:47:   required from ‘void BasicRelaxed< 
>::TestBody() [with  = int]’
ccHXKhJc.ii:47:6:   required from here
ccHXKhJc.ii:39:3: internal compiler error: in pop_local_binding, at
cp/name-lookup.cc:2474
   39 |   for (ref_ atomic : array{})
  |   ^~~
0x72069f pop_local_binding(tree_node*, tree_node*)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220702/gcc-12-20220702/gcc/cp/name-lookup.cc:2474
0x72069f poplevel(int, int, int)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220702/gcc-12-20220702/gcc/cp/decl.cc:733
0x13a626c do_poplevel(tree_node*)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220702/gcc-12-20220702/gcc/cp/semantics.cc:640
0x14f98c5 finish_for_stmt(tree_node*)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220702/gcc-12-20220702/gcc/cp/semantics.cc:1399
0x15c481e tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220702/gcc-12-20220702/gcc/cp/pt.cc:18768
0x15c428b tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220702/gcc-12-20220702/gcc/cp/pt.cc:18507
0x15c41f4 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220702/gcc-12-20220702/gcc/cp/pt.cc:18864
0x163cc24 instantiate_body
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220702/gcc-12-20220702/gcc/cp/pt.cc:26466
0x163ab56 instantiate_decl(tree_node*, bool, bool)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220702/gcc-12-20220702/gcc/cp/pt.cc:26758
0x1309d40 instantiate_pending_templates(int)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220702/gcc-12-20220702/gcc/cp/pt.cc:26837
0x1302380 c_parse_final_cleanups()
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220702/gcc-12-20220702/gcc/cp/decl2.cc:5128
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 c++/106230] New: ICE when building folly-2022.07.04.00 in pop_local_binding (cp/name-lookup.cc:2474)

2022-07-08 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106230

Bug ID: 106230
   Summary: ICE when building folly-2022.07.04.00 in
pop_local_binding (cp/name-lookup.cc:2474)
   Product: gcc
   Version: 12.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sam at gentoo dot org
  Target Milestone: ---

Created attachment 53274
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53274=edit
ccHXKhJc.ii.orig (original preprocessed source)

Hit this when building folly-2022.07.04.00 with 12.1.1_p20220702.

I've attached the original reproducer but I'll attach a minimised version
shortly too.

```
[484/826] /usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -DBOOST_ATOMIC_DYN_LINK
-DBOOST_ATOMIC_NO_LIB -DBOOST_CONTEXT_DYN_LINK -DBOOST_CONTEXT_NO_LIB
-DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB
-DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB
-DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_DYN_LINK
-DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB
-DFMT_SHARED
-DFOLLY_XLOG_STRIP_PREFIXES=\"/var/tmp/portage/dev-cpp/folly-2022.07.04.00/work:/var/tmp/portage/dev-cpp/folly-2022.07.04.00/work_build\"
-DGFLAGS_IS_A_DLL=0 -DGTEST_LINKED_AS_SHARED_LIBRARY=1 -D_GNU_SOURCE
-D_REENTRANT -I/var/tmp/portage/dev-cpp/folly-2022.07.04.00/work
-I/var/tmp/portage/dev-cpp/folly-2022.07.04.00/work_build
-I/usr/include/libiberty  -O2 -pipe -march=native -fdiagnostics-color=always
-frecord-gcc-switches -D_GLIBCXX_ASSERTIONS -ggdb3 -Werror=format-security
-Wformat -g -std=gnu++1z -finput-charset=UTF-8 -fsigned-char -Wall
-Wno-deprecated -Wno-deprecated-declarations -Wno-sign-compare -Wno-unused
-Wuninitialized -Wunused-label -Wunused-result -Wno-noexcept-type
-Wno-nullability-completeness -Wno-inconsistent-missing-override -faligned-new
-fopenmp -std=gnu++17 -MD -MT
CMakeFiles/atomic_util_test.dir/folly/synchronization/test/AtomicUtilTest.cpp.o
-MF
CMakeFiles/atomic_util_test.dir/folly/synchronization/test/AtomicUtilTest.cpp.o.d
-o
CMakeFiles/atomic_util_test.dir/folly/synchronization/test/AtomicUtilTest.cpp.o
-c
/var/tmp/portage/dev-cpp/folly-2022.07.04.00/work/folly/synchronization/test/AtomicUtilTest.cpp
FAILED:
CMakeFiles/atomic_util_test.dir/folly/synchronization/test/AtomicUtilTest.cpp.o
/usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -DBOOST_ATOMIC_DYN_LINK
-DBOOST_ATOMIC_NO_LIB -DBOOST_CONTEXT_DYN_LINK -DBOOST_CONTEXT_NO_LIB
-DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB
-DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB
-DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_DYN_LINK
-DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB
-DFMT_SHARED
-DFOLLY_XLOG_STRIP_PREFIXES=\"/var/tmp/portage/dev-cpp/folly-2022.07.04.00/work:/var/tmp/portage/dev-cpp/folly-2022.07.04.00/work_build\"
-DGFLAGS_IS_A_DLL=0 -DGTEST_LINKED_AS_SHARED_LIBRARY=1 -D_GNU_SOURCE
-D_REENTRANT -I/var/tmp/portage/dev-cpp/folly-2022.07.04.00/work
-I/var/tmp/portage/dev-cpp/folly-2022.07.04.00/work_build
-I/usr/include/libiberty  -O2 -pipe -march=native -fdiagnostics-color=always
-frecord-gcc-switches -D_GLIBCXX_ASSERTIONS -ggdb3 -Werror=format-security
-Wformat -g -std=gnu++1z -finput-charset=UTF-8 -fsigned-char -Wall
-Wno-deprecated -Wno-deprecated-declarations -Wno-sign-compare -Wno-unused
-Wuninitialized -Wunused-label -Wunused-result -Wno-noexcept-type
-Wno-nullability-completeness -Wno-inconsistent-missing-override -faligned-new
-fopenmp -std=gnu++17 -MD -MT
CMakeFiles/atomic_util_test.dir/folly/synchronization/test/AtomicUtilTest.cpp.o
-MF
CMakeFiles/atomic_util_test.dir/folly/synchronization/test/AtomicUtilTest.cpp.o.d
-o
CMakeFiles/atomic_util_test.dir/folly/synchronization/test/AtomicUtilTest.cpp.o
-c
/var/tmp/portage/dev-cpp/folly-2022.07.04.00/work/folly/synchronization/test/AtomicUtilTest.cpp
/var/tmp/portage/dev-cpp/folly-2022.07.04.00/work/folly/synchronization/test/AtomicUtilTest.cpp:
In instantiation of ‘void folly::{anonymous}::atomic_fetch_flip_basic(Op) [with
TypeParam = atomic_ref_of; Integer = short unsigned int; Op =
with_order]’:
/var/tmp/portage/dev-cpp/folly-2022.07.04.00/work/folly/synchronization/test/AtomicUtilTest.cpp:385:52:
  required from ‘void
folly::gtest_suite_AtomicFetchFlipTest_::Basic::TestBody()
[with gtest_TypeParam_ = folly::{anonymous}::atomic_ref_of]’
/var/tmp/portage/dev-cpp/folly-2022.07.04.00/work/folly/synchronization/test/AtomicUtilTest.cpp:382:1:
  required from here
/var/tmp/portage/dev-cpp/folly-2022.07.04.00/work/folly/synchronization/test/AtomicUtilTest.cpp:241:3:
internal compiler error: in pop_local_binding, at cp/name-lookup.cc:2474
  241 |   for (ref_ atomic : std::array{}) {
  |   ^~~
0x72069f pop_local_binding(tree_node*, tree_node*)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220702/gcc-12-20220702/gcc/cp/name-lookup.cc:2474
0x72069f 

[Bug bootstrap/105688] Cannot build GCC 11.3 on Fedora 36

2022-07-04 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105688

--- Comment #24 from Sam James  ---
(In reply to Vincent Lefèvre from comment #21)
> I have a similar issue under Debian/unstable with GCC old of a few months,
> where in x86_64-pc-linux-gnu/libstdc++-v3/po, msgfmt fails with an error like
> 
> /usr/bin/msgfmt:
> /home/vlefevre/software/gcc-build/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/
> libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by
> /usr/lib/x86_64-linux-gnu/libicuuc.so.71)
> 

This issue is, I think, slightly different: https://bugs.gentoo.org/843119. It
might end up being related but I've only ever seen *that* issue in the context
of installing libstdc++ when doing the gcc build when NLS is enabled and using
a newer GCC to do the build of an older version.

[Bug tree-optimization/106114] [13 Regression] wrong code at -O1, -O2 and -O3 on x86_64-linux-gnu since r13-1268-g8c99e307b20c502e

2022-06-30 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106114

--- Comment #11 from Sam James  ---
>This is less likely to occur in GCC12 as less places rewrite the IL under the 
>covers, but it should still be applied ot that branch just in case.

Should the bug be reopened for now then?

[Bug c++/106102] gcc/cp/mapper-resolver.cc fails to build against musl: musl-1.2.3-dev/include/sched.h:84:7: error: attempt to use poisoned "calloc"

2022-06-27 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106102

--- Comment #1 from Sam James  ---
See also bug 104799.

[Bug c++/106011] [12 Regression] ICE: unexpected expression 'ElemSize' of kind template_parm_index

2022-06-17 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106011

Sam James  changed:

   What|Removed |Added

 CC||sam at gentoo dot org

--- Comment #2 from Sam James  ---
Indeed, from the same source :)

[Bug c/105950] > O2 optimization causes runtime (SIGILL) during main initialization

2022-06-15 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105950

--- Comment #33 from Sam James  ---
As far as I can tell, that CPU might have AVX, but not AVX2.

[Bug c/105950] > O2 optimization causes runtime (SIGILL) during main initialization

2022-06-15 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105950

--- Comment #31 from Sam James  ---
What CPU do you have?

[Bug c/105950] > O2 optimization causes runtime (SIGILL) during main initialization

2022-06-14 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105950

Sam James  changed:

   What|Removed |Added

 CC||sam at gentoo dot org

--- Comment #24 from Sam James  ---
Please be polite on these bugs. There's a lot of documentation online about how
to use UBsan.

It's not ideal to upload a tarball with all of the bits, but if it's what's
needed, then I guess so be it. Some build systems make it easier to enable
sanitizers like Meson.

GCC's bug tracker isn't for general support on how to use build systems and
flags. 

The bug tracker is public and I don't think one can delete their own
attachments.

Are you saying that when you use -fsanitize=undefined and run your program, it
gets SIGILL'd?

[Bug c++/105931] [12 regression] ICE in cxx_eval_constant_expression

2022-06-11 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105931

--- Comment #2 from Sam James  ---
Interesting!

The minimised version of this is:
```
$ cat test.cxx
template  decltype(0 % ElemSize == 0)
```

```
$ g++ -o test.o -c -O2 test.cxx
new.cxx:1:52: internal compiler error: unexpected expression ‘ElemSize’ of kind
template_parm_index
1 | template  decltype(0 % ElemSize == 0)
  |   ~^~~~
0x6def33 cxx_eval_constant_expression
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/constexpr.cc:7587
0x6df310 cxx_eval_outermost_constant_expr
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/constexpr.cc:7824
0x6e154d potential_constant_expression_1
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/constexpr.cc:9274
0x6e1ef5 potential_constant_expression_1(tree_node*, bool, bool, bool, int)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/constexpr.cc:9550
0x6e1ef5 is_constant_expression(tree_node*)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/constexpr.cc:9607
0x6e1ef5 is_nondependent_constant_expression(tree_node*)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/constexpr.cc:9644
0x6e2b04 maybe_constant_value(tree_node*, tree_node*, bool)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/constexpr.cc:8071
0x74e35b fold_for_warn(tree_node*)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/expr.cc:416
0x8c9552 shorten_compare(unsigned int, tree_node**, tree_node**, tree_node**,
tree_code*)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/c-family/c-common.cc:3237
0x889d72 cp_build_binary_op(op_location_t const&, tree_code, tree_node*,
tree_node*, int)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/typeck.cc:6158
0x6bd96c build_new_op(op_location_t const&, tree_code, int, tree_node*,
tree_node*, tree_node*, tree_node*, tree_node**, int)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/call.cc:6935
0x88041b build_x_binary_op(op_location_t const&, tree_code, tree_node*,
tree_code, tree_node*, tree_code, tree_node*, tree_node**, int)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/typeck.cc:4563
0x81f7e7 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/pt.cc:20369
0x82337a instantiate_non_dependent_expr_internal(tree_node*, int)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/pt.cc:6367
0x82337a instantiate_non_dependent_expr_sfinae(tree_node*, int)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/pt.cc:6388
0x85eec3 finish_decltype_type(tree_node*, bool, int)
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/semantics.cc:11255
0x7e183f cp_parser_decltype
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/parser.cc:16540
0x7fa3e7 cp_parser_simple_type_specifier
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/parser.cc:19647
0x7d6cbd cp_parser_type_specifier
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/parser.cc:19424
0x7d7d81 cp_parser_decl_specifier_seq
   
/usr/src/debug/sys-devel/gcc-12.1.1_p20220611/gcc-12-20220611/gcc/cp/parser.cc:15905
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.
```

This minimised version is only slightly different to the one in the original
bug.

[Bug c++/105756] [12 Regression] ICE in cxx_eval_constant_expression at cp/constexpr.cc:7586: unexpected expression ‘ElemSize’ of kind template_parm_index

2022-06-11 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105756

--- Comment #7 from Sam James  ---
Thanks a bunch. Unfortunately the original issue (not the reduced one) still
fails, but I've filed bug 105931 for that.

[Bug c++/105931] [12 regression] ICE in cxx_eval_constant_expression

2022-06-11 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105931

Sam James  changed:

   What|Removed |Added

 CC||herrtimson at yahoo dot de,
   ||ppalka at gcc dot gnu.org,
   ||slyfox at gcc dot gnu.org

--- Comment #1 from Sam James  ---
I'll try to reduce now but wanted to include original given the previous issue.

[Bug c++/105931] New: [12 regression] ICE in cxx_eval_constant_expression

2022-06-11 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105931

Bug ID: 105931
   Summary: [12 regression] ICE in cxx_eval_constant_expression
   Product: gcc
   Version: 12.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sam at gentoo dot org
  Target Milestone: ---

Created attachment 53122
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53122=edit
ccLjLSAH.out.xz (preprocessed source, original)

The reduced test case in bug 105756 now passes with the fix for that bug, but
the original issue when building 0ad (0ad-0.0.25b_alpha) remains:
``
# x86_64-pc-linux-gnu-g++ -o Unified_cpp_js_src_new-regexp0.o -c 
-I/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/dist/system_wrappers
-include
/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/config/gcc_hidden.h
-fstack-protector-strong -DDEBUG=1 -DWASM_SUPPORTS_HUGE_MEMORY
-DJS_CACHEIR_SPEW -DJS_STRUCTURED_SPEW -DEXPORT_JS_API -DMOZ_HAS_MOZGLUE
-I/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/js/src/new-regexp
-I/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/js/src/new-regexp
-I/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/js/src
-I/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/js/src
-I/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/dist/include
-fPIC -DMOZILLA_CLIENT -include
/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/js/src/js-confdefs.h
-Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith
-Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings
-Wno-invalid-offsetof -Wc++2a-compat -Wduplicated-cond -Wimplicit-fallthrough
-Wunused-function -Wunused-variable -Wno-error=maybe-uninitialized
-Wno-error=deprecated-declarations -Wno-error=array-bounds
-Wno-error=coverage-mismatch -Wno-error=free-nonheap-object
-Wno-multistatement-macros -Wno-error=class-memaccess
-Wno-error=deprecated-copy -Wformat -Wformat-security -Wformat-overflow=2
-Wno-noexcept-type -fno-sized-deallocation -fno-aligned-new
-Werror=format-security -Wformat -O2 -pipe -march=native
-fdiagnostics-color=always -frecord-gcc-switches -D_GLIBCXX_ASSERTIONS -ggdb3
-Werror=format-security -Wformat -fno-rtti -ffunction-sections -fdata-sections
-fno-exceptions -fno-math-errno -pthread -pipe -g -fno-omit-frame-pointer
-funwind-tables -fno-strict-aliasing -Werror=format -Wno-shadow -Wno-attributes
 -MD -MP -MF .deps/Unified_cpp_js_src_new-regexp0.o.pp  
Unified_cpp_js_src_new-regexp0.cpp -freport-bug
In file included from
/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/dist/include/mozilla/ArrayUtils.h:14,
 from
/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/js/src/frontend/TokenStream.h:184,
 from
/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/js/src/new-regexp/RegExpAPI.h:12,
 from
/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/js/src/new-regexp/RegExpAPI.cpp:11,
 from Unified_cpp_js_src_new-regexp0.cpp:2:
/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/js/src/util/TrailingArray.h:
In member function ‘size_t js::TrailingArray::numElements(Offset, Offset)
const’:
/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/js/src/util/TrailingArray.h:73:41:
internal compiler error: unexpected expression ‘ElemSize’ of kind
template_parm_index
   73 | MOZ_ASSERT((end - start) % ElemSize == 0);
  |~^~~~
/var/tmp/portage/games-strategy/0ad-0.0.25b_alpha-r1/work/0ad-0.0.25b-alpha/libraries/source/spidermonkey/mozjs-78.6.0/build-debug/dist/include/mozilla/Assertions.h:445:58:
note: in definition of macro ‘MOZ_VALIDATE_ASSERT_CONDITION_TYPE’
  445 | mozilla::detail::AssertionConditionType::isValid,
\
  |  ^

[Bug c++/105756] [12 Regression] ICE in cxx_eval_constant_expression at cp/constexpr.cc:7586: unexpected expression ‘ElemSize’ of kind template_parm_index

2022-06-10 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105756

--- Comment #4 from Sam James  ---
Thanks! Could you consider backporting to 12.x soonish, if possible? I ask
because with this, the 12.x branch is then in a pretty good state for more
widespread testing.

(Unfortunately, I got a bit unlucky and kept hitting ICEs when trying to build
a bunch of common packages.)

[Bug rtl-optimization/104637] [10/11 Regression] ICE: maximum number of LRA assignment passes is achieved (30) with -Og -fno-forward-propagate -mavx since r9-5221-gd8fcab689435a29d

2022-06-06 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104637

--- Comment #9 from Sam James  ---
Could this be backported to 10 + 11 please?

[Bug c++/105852] [13 Regression] ice in instantiate_decl

2022-06-05 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105852

--- Comment #3 from Sam James  ---
Thanks for reporting, beat me to it. Looks like it's same on latest 11 (11.3.1
20220602) and 12 (12.1.1 20220604) snapshots.

[Bug c++/105852] [13 Regression] ice in instantiate_decl

2022-06-05 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105852

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

[Bug c++/105859] ICE in instantiate_decl

2022-06-05 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105859

Sam James  changed:

   What|Removed |Added

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

--- Comment #4 from Sam James  ---
.

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

[Bug c++/105859] ICE in instantiate_decl

2022-06-05 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105859

--- Comment #3 from Sam James  ---
Ah, it's probably a dupe of bug 105852.

[Bug c++/105859] ICE in instantiate_decl

2022-06-05 Thread sam at gentoo dot org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105859

--- Comment #2 from Sam James  ---
Created attachment 53091
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53091=edit
vector.ii.orig.xz

  1   2   >