[Bug bootstrap/113132] New: [14 regression] --enable-checking=release build fails: tree-vect-loop.cc:6221:34: error: ‘vec_stmts.vec::m_vec’ may be used uninitialized [-Werror

2023-12-25 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113132

Bug ID: 113132
   Summary: [14 regression] --enable-checking=release build fails:
tree-vect-loop.cc:6221:34: error:
‘vec_stmts.vec::m_vec’ may
be used uninitialized [-Werror=maybe-uninitialized]
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: bootstrap
  Assignee: unassigned at gcc dot gnu.org
  Reporter: slyfox at gcc dot gnu.org
  Target Milestone: ---

Noticed on today's build of master r14-6828-g0beeddd6b1b1cb :

$ ../gcc/configure --disable-multilib --enable-checking=release
$ make
...
/tmp/gb/./prev-gcc/xg++ -B/tmp/gb/./prev-gcc/
-B/usr/local/x86_64-pc-linux-gnu/bin/ -nostdinc++
-B/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-B/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs 
-I/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu 
-I/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/include 
-I/home/slyfox/dev/git/gcc/libstdc++-v3/libsupc++
-L/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/src/.libs
-L/tmp/gb/prev-x86_64-pc-linux-gnu/libstdc++-v3/libsupc++/.libs  -fno-PIE -c  
-g -O2 -fno-checking -gtoggle -DIN_GCC-fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Wconditionally-supported
-Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings -Werror   -DHAVE_CONFIG_H -fno-PIE -I. -I.
-I/home/slyfox/dev/git/gcc/gcc -I/home/slyfox/dev/git/gcc/gcc/.
-I/home/slyfox/dev/git/gcc/gcc/../include 
-I/home/slyfox/dev/git/gcc/gcc/../libcpp/include
-I/home/slyfox/dev/git/gcc/gcc/../libcody 
-I/home/slyfox/dev/git/gcc/gcc/../libdecnumber
-I/home/slyfox/dev/git/gcc/gcc/../libdecnumber/bid -I../libdecnumber
-I/home/slyfox/dev/git/gcc/gcc/../libbacktrace   -o tree-vect-loop.o -MT
tree-vect-loop.o -MMD -MP -MF ./.deps/tree-vect-loop.TPo
/home/slyfox/dev/git/gcc/gcc/tree-vect-loop.cc
/home/slyfox/dev/git/gcc/gcc/tree-vect-loop.cc: In function 'void
vect_create_epilog_for_reduction(loop_vec_info, stmt_vec_info, slp_tree,
slp_instance, edge)':
/home/slyfox/dev/git/gcc/gcc/tree-vect-loop.cc:6221:34: error:
'vec_stmts.vec::m_vec' may be used uninitialized
[-Werror=maybe-uninitialized]
 6221 | def = gimple_get_lhs (vec_stmts[j]);
  |   ~~~^~
/home/slyfox/dev/git/gcc/gcc/tree-vect-loop.cc:6210:18: note:
'vec_stmts.vec::m_vec' was declared here
 6210 |   vec  vec_stmts;
  |  ^
cc1plus: all warnings being treated as errors
make[3]: *** [Makefile:1198: tree-vect-loop.o] Error 1
make[3]: Leaving directory '/tmp/gb/gcc'
make[2]: *** [Makefile:5094: all-stage2-gcc] Error 2
make[2]: Leaving directory '/tmp/gb'
make[1]: *** [Makefile:26393: stage2-bubble] Error 2
make[1]: Leaving directory '/tmp/gb'
make: *** [Makefile:1096: all] Error 2

$ ./gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=./gcc/xgcc
Target: x86_64-pc-linux-gnu
Configured with: /home/slyfox/dev/git/gcc/configure --disable-multilib
--enable-checking=release
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.0 20231225 (experimental) (GCC)

[Bug bootstrap/113132] [14 regression] --enable-checking=release build fails: tree-vect-loop.cc:6221:34: error: ‘vec_stmts.vec::m_vec’ may be used uninitialized [-Werror=mayb

2023-12-25 Thread slyfox at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113132

Sergei Trofimovich  changed:

   What|Removed |Added

 CC||tamar.christina at arm dot com

--- Comment #1 from Sergei Trofimovich  ---
Might be exposed by r14-6822-g01f4251b8775c8 "middle-end: Support vectorization
of loops with multiple exits."

[Bug target/110320] ELFv2 pc-rel ABI extension allows using r2 as a volatile register

2023-12-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110320

--- Comment #2 from GCC Commits  ---
The master branch has been updated by jeevitha :

https://gcc.gnu.org/g:1bbb169fe6f91451a2754f0b86301551db76ceba

commit r14-6829-g1bbb169fe6f91451a2754f0b86301551db76ceba
Author: Jeevitha 
Date:   Mon Dec 25 04:06:54 2023 -0600

rs6000: Change GPR2 to volatile & non-fixed register for function that does
not use TOC [PR110320]

Normally, GPR2 is the TOC pointer and is defined as a fixed and
non-volatile
register. However, it can be used as volatile for PCREL addressing.
Therefore,
modified r2 to be non-fixed in FIXED_REGISTERS and set it to fixed if it is
not
PCREL and also when the user explicitly requests TOC or fixed. If the
register
r2 is fixed, it is made as non-volatile. Changes in register preservation
roles
can be accomplished with the help of available target hooks
(TARGET_CONDITIONAL_REGISTER_USAGE).

2023-12-24  Jeevitha Palanisamy  

gcc/
PR target/110320
* config/rs6000/rs6000.cc (rs6000_conditional_register_usage):
Change
GPR2 to volatile and non-fixed register for PCREL.
* config/rs6000/rs6000.h (FIXED_REGISTERS): Modify GPR2 to not
fixed.

gcc/testsuite/
PR target/110320
* gcc.target/powerpc/pr110320-1.c: New testcase.
* gcc.target/powerpc/pr110320-2.c: New testcase.
* gcc.target/powerpc/pr110320-3.c: New testcase.

Co-authored-by: Peter Bergner 

[Bug bootstrap/113132] [14 regression] --enable-checking=release build fails: tree-vect-loop.cc:6221:34: error: ‘vec_stmts.vec::m_vec’ may be used uninitialized [-Werror=mayb

2023-12-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113132

--- Comment #2 from GCC Commits  ---
The master branch has been updated by Tamar Christina :

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

commit r14-6830-gfd032cce216e003d58b2394f7e61b03dee27e81a
Author: Tamar Christina 
Date:   Mon Dec 25 10:58:40 2023 +

middle-end: explicitly initialize vec_stmts [PR113132]

when configured with --enable-checking=release we get a false
positive on the use of vec_stmts as the compiler seems unable
to notice it gets initialized through the pass-by-reference.

This explicitly initializes the local.

gcc/ChangeLog:

PR bootstrap/113132
* tree-vect-loop.cc (vect_create_epilog_for_reduction): Initialize
vec_stmts;

[Bug bootstrap/113132] [14 regression] --enable-checking=release build fails: tree-vect-loop.cc:6221:34: error: ‘vec_stmts.vec::m_vec’ may be used uninitialized [-Werror=mayb

2023-12-25 Thread tnfchris at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113132

Tamar Christina  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|UNCONFIRMED |RESOLVED
 CC||tnfchris at gcc dot gnu.org

--- Comment #3 from Tamar Christina  ---
fixed, thanks

[Bug target/110899] RFE: Attributes preserve_most and preserve_all

2023-12-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110899

Sam James  changed:

   What|Removed |Added

 CC||arsen at gcc dot gnu.org,
   ||sjames at gcc dot gnu.org

--- Comment #12 from Sam James  ---
See
https://discourse.llvm.org/t/rfc-exposing-ghccc-calling-convention-as-preserve-none-to-clang/74233
too (via https://github.com/python/cpython/pull/113465 &
https://github.com/python/cpython/issues/113464).

[Bug c/83324] [feature request] Pragma or special syntax for guaranteed tail calls

2023-12-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83324

Sam James  changed:

   What|Removed |Added

 CC||arsen at gcc dot gnu.org,
   ||dmalcolm at gcc dot gnu.org
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=110899

--- Comment #12 from Sam James  ---
(In reply to David Edelsohn from comment #11)
> GIMPLE supports must_tail, but it is not exposed at the sources level /
> attributes in GCC.
> 
> CPython is not adding the LLVM JIT at runtime.  The proposal is to utilize
> LLVM at build time to generate code templates that can be copied into the
> CPython binary and patched with relocations.

This is now up as https://github.com/python/cpython/pull/113465 and
https://github.com/python/cpython/issues/113464.

See also PR110899 and
https://discourse.llvm.org/t/rfc-exposing-ghccc-calling-convention-as-preserve-none-to-clang/74233
(which is linked from the CPython PR for adding the JIT).

[Bug target/113133] New: [14 Regression] ICE: SIGSEGV in mark_label_nuses(rtx_def*) (emit-rtl.cc:3896) with -O -fno-tree-ter -mavx512f -march=barcelona

2023-12-25 Thread zsojka at seznam dot cz via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113133

Bug ID: 113133
   Summary: [14 Regression] ICE: SIGSEGV in
mark_label_nuses(rtx_def*) (emit-rtl.cc:3896) with -O
-fno-tree-ter -mavx512f -march=barcelona
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: ice-on-valid-code
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: zsojka at seznam dot cz
  Target Milestone: ---
  Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu

Created attachment 56931
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56931&action=edit
reduced testcase

I am observing these kind of SEGSEGV, -O -fno-tree-ter -mavx512f -march="some
older amd64" seems to be the common set of flags. Up to try_split() seems to be
the common backtrace.

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O -fno-tree-ter -mavx512f -march=barcelona
testcase.c -wrapper valgrind,-q
==3147== Invalid read of size 1
==3147==at 0x1079841: mark_label_nuses(rtx_def*) (emit-rtl.cc:3896)
==3147==by 0x10798C4: mark_label_nuses(rtx_def*) (emit-rtl.cc:3904)
==3147==by 0x10798C4: mark_label_nuses(rtx_def*) (emit-rtl.cc:3904)
==3147==by 0x10798C4: mark_label_nuses(rtx_def*) (emit-rtl.cc:3904)
==3147==by 0x108057A: try_split(rtx_def*, rtx_insn*, int)
(emit-rtl.cc:4093)
==3147==by 0x144AB28: split_insn(rtx_insn*) (recog.cc:3405)
==3147==by 0x14519C5: split_all_insns() (recog.cc:3509)
==3147==by 0x1451AE8: (anonymous
namespace)::pass_split_all_insns::execute(function*) (recog.cc:4433)
==3147==by 0x13C9A6A: execute_one_pass(opt_pass*) (passes.cc:2646)
==3147==by 0x13CA35F: execute_pass_list_1(opt_pass*) (passes.cc:2755)
==3147==by 0x13CA371: execute_pass_list_1(opt_pass*) (passes.cc:2756)
==3147==by 0x13CA371: execute_pass_list_1(opt_pass*) (passes.cc:2756)
==3147==  Address 0x2 is not stack'd, malloc'd or (recently) free'd
==3147== 
during RTL pass: split2
testcase.c: In function 'foo0':
testcase.c:68:1: internal compiler error: Segmentation fault
   68 | }
  | ^
0x150b4af crash_signal
/repo/gcc-trunk/gcc/toplev.cc:316
0x1079841 mark_label_nuses
/repo/gcc-trunk/gcc/emit-rtl.cc:3896
0x10798c4 mark_label_nuses
/repo/gcc-trunk/gcc/emit-rtl.cc:3904
0x10798c4 mark_label_nuses
/repo/gcc-trunk/gcc/emit-rtl.cc:3904
0x10798c4 mark_label_nuses
/repo/gcc-trunk/gcc/emit-rtl.cc:3904
0x108057a try_split(rtx_def*, rtx_insn*, int)
/repo/gcc-trunk/gcc/emit-rtl.cc:4093
0x144ab28 split_insn
/repo/gcc-trunk/gcc/recog.cc:3405
0x14519c5 split_all_insns()
/repo/gcc-trunk/gcc/recog.cc:3509
0x1451ae8 execute
/repo/gcc-trunk/gcc/recog.cc:4433
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.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-6825-20231224193009-ga657c7e3518-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-6825-20231224193009-ga657c7e3518-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231224 (experimental) (GCC)

[Bug c/113134] New: Middle end early break vectorization: Fail to vectorize a simple early break code

2023-12-25 Thread juzhe.zhong at rivai dot ai via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113134

Bug ID: 113134
   Summary: Middle end early break vectorization: Fail to
vectorize a simple early break code
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: juzhe.zhong at rivai dot ai
  Target Milestone: ---

Hi, as reference shows:

https://compiler-explorer.com/z/zMzba7WT1

void add(int N, int *__restrict a, int *__restrict b, int *__restrict c) {
  for (int i = 0; i < N; i++) {
c[i] = a[i] + b[i];
if (i > 1000) {
break;
}
  }
}

GCC failed to vectorize it:

add:
cmp w0, 0
ble .L1
sbfiz   x6, x0, 2, 32
mov x4, 0
.L3:
ldr w0, [x1, x4]
ldr w5, [x2, x4]
add w0, w0, w5
str w0, [x3, x4]
cmp x4, 4004
beq .L1
add x4, x4, 4
cmp x6, x4
bne .L3
.L1:
ret

But clang is able to vectorize it:

add:// @add
cmp w0, #1
b.lt.LBB0_8
mov w8, w0
mov w9, #1001   // =0x3e9
sub x8, x8, #1
cmp x8, #1001
cselx9, x8, x9, lo
add x10, x9, #1
cnthx9
cmp x10, x9
b.hs.LBB0_3
mov x9, xzr
b   .LBB0_6
.LBB0_3:
ptrue   p0.s
neg x9, x9
mov x11, xzr
and x9, x10, x9
addvl   x12, x1, #1
addvl   x13, x2, #1
addvl   x14, x3, #1
.LBB0_4:// =>This Inner Loop Header: Depth=1
ld1w{ z0.s }, p0/z, [x1, x11, lsl #2]
ld1w{ z1.s }, p0/z, [x2, x11, lsl #2]
ld1w{ z2.s }, p0/z, [x12, x11, lsl #2]
ld1w{ z3.s }, p0/z, [x13, x11, lsl #2]
add z0.s, z1.s, z0.s
add z1.s, z3.s, z2.s
st1w{ z0.s }, p0, [x3, x11, lsl #2]
st1w{ z1.s }, p0, [x14, x11, lsl #2]
inchx11
cmp x9, x11
b.ne.LBB0_4
cmp x10, x9
b.eq.LBB0_8
.LBB0_6:// =>This Inner Loop Header: Depth=1
lsl x10, x9, #2
cmp x9, #1001
ldr w11, [x1, x10]
ldr w12, [x2, x10]
add w11, w12, w11
str w11, [x3, x10]
b.eq.LBB0_8
cmp x8, x9
add x9, x9, #1
b.ne.LBB0_6
.LBB0_8:
ret

[Bug tree-optimization/113135] New: [14 regression] ICE when building unrar (error: PHI node with wrong VUSE on edge from BB 46)

2023-12-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113135

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

Hit this when building unrar:
```
x86_64-pc-linux-gnu-g++  -O3 -pipe -march=znver2 -fdiagnostics-color=always
-fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP -DRARDLL -c
../unpack.cpp
In file included from ../unpack.cpp:14:
../unpack30.cpp: In member function ‘bool Unpack::ReadTables30()’:
../unpack30.cpp:628:6: error: PHI node with wrong VUSE on edge from BB 46
  628 | bool Unpack::ReadTables30()
  |  ^~
.MEM_409 = PHI <.MEM_214(46)>
expected .MEM_200
../unpack30.cpp:628:6: error: multiple virtual PHI nodes in BB 81
.MEM_283 = PHI <.MEM_200(47)>
.MEM_408 = PHI <.MEM_214(47)>
../unpack30.cpp:628:6: error: PHI node with wrong VUSE on edge from BB 81
.MEM_281 = PHI <.MEM_408(81), .MEM_409(86)>
expected .MEM_283
../unpack30.cpp:628:6: error: PHI node with wrong VUSE on edge from BB 14
.MEM_411 = PHI <.MEM_209(14)>
expected .MEM_387
../unpack30.cpp:628:6: error: multiple virtual PHI nodes in BB 91
.MEM_332 = PHI <.MEM_387(15)>
.MEM_410 = PHI <.MEM_209(15)>
../unpack30.cpp:628:6: error: PHI node with wrong VUSE on edge from BB 91
.MEM_334 = PHI <.MEM_410(91), .MEM_411(96)>
expected .MEM_332
during GIMPLE pass: vect
../unpack30.cpp:628:6: internal compiler error: verify_ssa failed
0x55c82dd33df8 verify_ssa(bool, bool)
   
/usr/src/debug/sys-devel/gcc-14.0.0./gcc-14.0.0./gcc/tree-ssa.cc:1203
0x55c82d93f39d execute_function_todo
   
/usr/src/debug/sys-devel/gcc-14.0.0./gcc-14.0.0./gcc/passes.cc:2095
0x55c82d93f830 execute_todo
   
/usr/src/debug/sys-devel/gcc-14.0.0./gcc-14.0.0./gcc/passes.cc:2142
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
make: *** [../makefile:132: unpack.o] Error 1
make: Leaving directory
'/var/tmp/portage/app-arch/unrar-6.2.12-r1/work/unrar/build-lib'
 * ERROR: app-arch/unrar-6.2.12-r1::gentoo failed (compile phase):
```

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

[Bug tree-optimization/113135] [14 regression] ICE when building unrar (error: PHI node with wrong VUSE on edge from BB 46)

2023-12-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113135

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

[Bug tree-optimization/113135] [14 regression] ICE when building unrar (error: PHI node with wrong VUSE on edge from BB 46)

2023-12-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113135

--- Comment #2 from Sam James  ---
'g++ -O3 -march=znver2 -c unpack.ii' is enough to repro

[Bug c/113134] Middle end early break vectorization: Fail to vectorize a simple early break code

2023-12-25 Thread tnfchris at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113134

Tamar Christina  changed:

   What|Removed |Added

   Last reconfirmed||2023-12-25
   Keywords||missed-optimization

--- Comment #1 from Tamar Christina  ---
Yeah, the patch wasn't intended to handle that case.

As the patch says it requires the sizes of the memories being accessed to be
constant. i.e. https://compiler-explorer.com/z/87d61h3x5 works and that already
works today.


my patch would allow this if we relax vect_analyze_early_break_dependences to
not worry about memory accesses if the condition itself does not access memory.

However I don't think this should get to my patch at all. this loop

void add(int N, int *__restrict a, int *__restrict b, int *__restrict c) {
  for (int i = 0; i < N; i++) {
c[i] = a[i] + b[i];
if (i > 1000) {
break;
}
  }
}

is essentially

void add2(int N, int *__restrict a, int *__restrict b, int *__restrict c) {
  for (int i = 0; i < 1001; i++) {
c[i] = a[i] + b[i];
  }
}

and is what clang has rewritten it to.

GCC does the same in ivcanon but then doesn't realize the additional exit is
unreachable and should be removed.  So this case needs to be handled before it
reaches the vectorizer.

[Bug c++/113129] "using declaration" not detected as "exported" in exported namespace (C++ modules)

2023-12-25 Thread admin at hexadigm dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113129

--- Comment #3 from Larry Smith  ---
UPDATE: This issue is presumably the same as this (didn't come across it when I
searched for any similar bugs prior to posting):

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109679

Agree with Nicolai Josuttis in above post however, issue is important to fix
(modules still under development in GCC presumably).

[Bug c++/109679] export using for functions does not work as specified

2023-12-25 Thread admin at hexadigm dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109679

Larry Smith  changed:

   What|Removed |Added

 CC||admin at hexadigm dot com

--- Comment #3 from Larry Smith  ---
Likely the same issue I reported here (didn't see yours before posting):

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113129

[Bug tree-optimization/113136] New: [14 regression] ICE when building Perl

2023-12-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113136

Bug ID: 113136
   Summary: [14 regression] ICE when building Perl
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: tnfchris at gcc dot gnu.org
  Target Milestone: ---

I'll file bugs for each of these I hit, and then even if they're dupes, we get
more test cases out of it, so...

Hit when building perl-5.38.

native=znver2:
```
x86_64-pc-linux-gnu-gcc -c -DPERL_CORE -O3 -pipe -march=native
-fdiagnostics-color=always -Waddress -Warray-bounds -Wfree-nonheap-object
-Wint-to-pointer-cast -Wmain -Wnonnull -Wodr -Wreturn-type
-Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstring-compare -Wuninitialized
-Wvarargs -fno-strict-aliasing -DNO_PERL_RAND_SEED -fwrapv -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -std=c99 -O3 -pipe -march=native
-fdiagnostics-color=always -Waddress -Warray-bounds -Wfree-nonheap-object
-Wint-to-pointer-cast -Wmain -Wnonnull -Wodr -Wreturn-type
-Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstring-compare -Wuninitialized
-Wvarargs -fno-strict-aliasing -Wall -Werror=pointer-arith -Werror=vla -Wextra
-Wno-long-long -Wno-declaration-after-statement -Wc++-compat -Wwrite-strings
-fPIC toke.c
toke.c: In function ‘yyl_try’:
toke.c:8984:1: error: definition in block 413 does not dominate use in block
420
 8984 | yyl_try(pTHX_ char *s)
  | ^~~
for SSA_NAME: vect__256.7602_2087 in statement:
vect__256.7602_2086 = PHI 
PHI argument
vect__256.7602_2087
for PHI node
vect__256.7602_2086 = PHI 
during GIMPLE pass: vect
toke.c:8984:1: internal compiler error: verify_ssa failed
0x55bcb952ea88 verify_ssa(bool, bool)
   
/usr/src/debug/sys-devel/gcc-14.0.0./gcc-14.0.0./gcc/tree-ssa.cc:1203
0x55bcb9130a9d execute_function_todo
   
/usr/src/debug/sys-devel/gcc-14.0.0./gcc-14.0.0./gcc/passes.cc:2095
0x55bcb9130f30 execute_todo
   
/usr/src/debug/sys-devel/gcc-14.0.0./gcc-14.0.0./gcc/passes.cc:2142
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
make: *** [makefile:260: toke.o] Error 1
```

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

'gcc -c ./toke.i -O3 -march=znver2' is enough to reproduce.

[Bug tree-optimization/113136] [14 regression] ICE when building Perl

2023-12-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113136

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

[Bug tree-optimization/113135] [14 regression] ICE when building unrar (error: PHI node with wrong VUSE on edge from BB 46)

2023-12-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113135

--- Comment #3 from Sam James  ---
Created attachment 56934
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56934&action=edit
reduced.ii

Reduced.

[Bug tree-optimization/113136] [14 regression] ICE when building Perl

2023-12-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113136

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

Reduced.

[Bug tree-optimization/113135] [14 regression] ICE when building unrar (error: PHI node with wrong VUSE on edge from BB 46)

2023-12-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113135

--- Comment #4 from Sam James  ---
(In reply to Sam James from comment #3)
> Created attachment 56934 [details]
> reduced.ii
> 
> Reduced.

Interestingly, it seems to ICE as C++, not as C.

[Bug tree-optimization/113137] New: [14 regression] Failed bootstrap with -O3 -march=znver2

2023-12-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113137

Bug ID: 113137
   Summary: [14 regression] Failed bootstrap with -O3
-march=znver2
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
CC: tnfchris at gcc dot gnu.org
  Target Milestone: ---

Created attachment 56936
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56936&action=edit
c-cppbuiltin.ii.xz

```
# /tmp/gcc/bin/g++ -c c-cppbuiltin.ii -O3 -march=znver2
/var/tmp/portage/sys-devel/gcc-14.0.0_pre20231224/work/gcc-14-20231224/gcc/c-family/c-cppbuiltin.cc:
In function 'void builtin_define_type_minmax(const char*, const char*, tree)':
/var/tmp/portage/sys-devel/gcc-14.0.0_pre20231224/work/gcc-14-20231224/gcc/c-family/c-cppbuiltin.cc:2043:1:
error: PHI node with wrong VUSE on edge from BB 12
 2043 | builtin_define_type_minmax (const char *min_macro, const char
*max_macro,
  | ^~
.MEM_218 = PHI <.MEM_59(12)>
expected .MEM_191
/var/tmp/portage/sys-devel/gcc-14.0.0_pre20231224/work/gcc-14-20231224/gcc/c-family/c-cppbuiltin.cc:2043:1:
error: multiple virtual PHI nodes in BB 32
.MEM_99 = PHI <.MEM_191(14)>
.MEM_217 = PHI <.MEM_59(14)>
/var/tmp/portage/sys-devel/gcc-14.0.0_pre20231224/work/gcc-14-20231224/gcc/c-family/c-cppbuiltin.cc:2043:1:
error: PHI node with wrong VUSE on edge from BB 32
.MEM_103 = PHI <.MEM_217(32), .MEM_218(37)>
expected .MEM_99
during GIMPLE pass: vect
/var/tmp/portage/sys-devel/gcc-14.0.0_pre20231224/work/gcc-14-20231224/gcc/c-family/c-cppbuiltin.cc:2043:1:
internal compiler error: verify_ssa failed
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://gcc.gnu.org/bugs/> for instructions.
```

```
Using built-in specs.
COLLECT_GCC=/tmp/gcc/bin/g++
COLLECT_LTO_WRAPPER=/tmp/gcc/libexec/gcc/x86_64-pc-linux-gnu/14.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /home/sam/git/gcc/configure --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --disable-analyzer
--disable-cet --disable-default-pie --disable-default-ssp --disable-gcov
--disable-libada --disable-libatomic --disable-libgomp --disable-libitm
--disable-libquadmath --disable-libsanitizer --disable-libssp
--disable-libstdcxx-pch --disable-libvtv --disable-lto --disable-multilib
--disable-nls --disable-objc-gc --disable-systemtap --disable-werror
--enable-languages=c,c++ --prefix=/tmp/gcc --with-checking=yes,extra,rtl
--without-libatomic --without-libbacktrace --without-isl --without-zstd
--with-system-zlib --enable-lto --with-build-config=bootstrap-lto
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.0 20231225 (experimental) (GCC)
```

[Bug tree-optimization/113137] [14 regression] Failed bootstrap with -O3 -march=znver2

2023-12-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113137

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

[Bug tree-optimization/113138] New: `x < ~x` can be simplified to `((signed)x) < 0`

2023-12-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113138

Bug ID: 113138
   Summary: `x < ~x` can be simplified to `((signed)x) < 0`
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Keywords: missed-optimization
  Severity: enhancement
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
```
#include 
bool srcu(uint32_t x) { return x < ~x; }
bool srcs(int32_t x) { return x < ~x; }
```

But of these can be optimized to:

```
#include 
bool tgt(int32_t x) { return x < 0; }
```

`x >= ~x` can be optimzed to `x >=s 0` (boolean opposites).
While `x > ~x` can be optimized to `(~x) s -1` or rather `x
>=s 0`.
While `x <= ~x` can be optimized to `x 

[Bug tree-optimization/113138] `x < ~x` can be simplified to `((signed)x) < 0`

2023-12-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113138

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   Assignee|unassigned at gcc dot gnu.org  |pinskia at gcc dot 
gnu.org
   Last reconfirmed||2023-12-25
 Status|UNCONFIRMED |ASSIGNED

--- Comment #1 from Andrew Pinski  ---
Actually the following list is correct:
signed
X s< ~X   --> X s< 0
X s<= ~X  --> X s< ~X  --> X s< 0

X s> ~X   --> X s> 0
X s>= ~X  --> X s> ~X  --> X s> 0

unsigned:
X u< ~X   -->  X u> SIGNBIT_OF(X)
X u<= ~X  --> X u< ~X  --> X u> SIGNBIT_OF(X)

X u> ~X   -->  X u< SIGNBIT_OF(X)
X u>= ~X  -->~X u> X   --> X u< SIGNBIT_OF(X)

So the correct idea is this:
(for (cmp  lt le gt ge)
 (rcmp gt gt lt lt)
 (simplify
  (cmp @0 @1)
  (with { bool wascmp; }
   (if (bitwise_inverted_equal_p (@0, @1, wascmp)
&& (!wascmp || element_precision (type) == 1))
   (with {
 tree inner_type = TREE_TYPE (@0);
 int precision = TYPE_PRECISION (inner_type);
 // the min value here is in the opposite signedness.
 auto ncst = wi::min_value (precision, TYPE_UNSIGNED (inner_type) ? SIGNED
: UNSIGNED);
}
(rcmp @0 { wide_int_to_tree (inner_type, ncst); })
  )
 )
)

[Bug tree-optimization/113139] New: [14 regression] ICE when building Binutils

2023-12-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
sable-systemtap --disable-valgrind-annotations
--disable-vtable-verify --disable-libvtv --with-zstd --without-isl
--enable-default-pie --enable-host-pie --disable-host-bind-now
--enable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231225 (experimental)
0beeddd6b1b1cb41104c4df925323e8fc0437ba8 (Gentoo 14.0.0 p, commit
2250dc0cc8c46999ad1c1d79b9aeed9056459bb6)
```

'gcc -c atof-ieee.i -O3 -march=znver2' is enough to reproduce.

[Bug tree-optimization/113138] `x < ~x` can be simplified to `((signed)x) < 0`

2023-12-25 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113138

Jakub Jelinek  changed:

   What|Removed |Added

 CC||jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek  ---
(In reply to Andrew Pinski from comment #1)
> Actually the following list is correct:
> signed
> X s< ~X   --> X s< 0
> X s<= ~X  --> X s< ~X  --> X s< 0
> 
> X s> ~X   --> X s> 0
> X s>= ~X  --> X s> ~X  --> X s> 0
> 
> unsigned:
> X u< ~X   -->  X u> SIGNBIT_OF(X)
> X u<= ~X  --> X u< ~X  --> X u> SIGNBIT_OF(X)
> 
> X u> ~X   -->  X u< SIGNBIT_OF(X)
> X u>= ~X  -->~X u> X   --> X u< SIGNBIT_OF(X)
> 
> So the correct idea is this:
> (for (cmp  lt le gt ge)
>  (rcmp gt gt lt lt)
>  (simplify
>   (cmp @0 @1)
>   (with { bool wascmp; }
>(if (bitwise_inverted_equal_p (@0, @1, wascmp)
> && (!wascmp || element_precision (type) == 1))
>(with {
>  tree inner_type = TREE_TYPE (@0);
>  int precision = TYPE_PRECISION (inner_type);
>  // the min value here is in the opposite signedness.
>  auto ncst = wi::min_value (precision, TYPE_UNSIGNED (inner_type) ?
> SIGNED : UNSIGNED);
> }
> (rcmp @0 { wide_int_to_tree (inner_type, ncst); })
>   )
>  )
> )

Will something then fold it further if it is actually ~X s< X (because the
above would then fold it into ~X s< 0)?

[Bug tree-optimization/113138] `x < ~x` can be simplified to `((signed)x) < 0`

2023-12-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113138

--- Comment #3 from Andrew Pinski  ---
(In reply to Jakub Jelinek from comment #2)
> Will something then fold it further if it is actually ~X s< X (because the
> above would then fold it into ~X s< 0)?

Yes there is already a pattern for that:
/* Fold ~X op C as X op' ~C, where op' is the swapped comparison.  */

Which should handle the `~X u< signbit(X)` one too.

[Bug tree-optimization/113139] [14 regression] ICE when building Binutils

2023-12-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113139

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

[Bug target/113140] New: [SPARC] [13 Regression] Segmentation fault during RTL pass: dbr

2023-12-25 Thread glaubitz at physik dot fu-berlin.de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113140

Bug ID: 113140
   Summary: [SPARC] [13 Regression] Segmentation fault during RTL
pass: dbr
   Product: gcc
   Version: 13.2.1
   URL: https://buildd.debian.org/status/fetch.php?pkg=qt6-dec
larative&arch=sparc64&ver=6.6.1%2Bdfsg-1&stamp=1702262
113&raw=0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: target
  Assignee: unassigned at gcc dot gnu.org
  Reporter: glaubitz at physik dot fu-berlin.de
CC: jrtc27 at jrtc27 dot com, matorola at gmail dot com, ro at 
gcc dot gnu.org,
sjames at gcc dot gnu.org, sumbera at volny dot cz
  Target Milestone: ---
Target: sparc64-linux-gnu

When building qt6-declarative on 64-bit Linux SPARC, gcc-13 crashes with the
following error message:

(experimental_sparc64-dchroot)glaubitz@stadler:~/qt6-declarative/qt6-declarative-6.6.1+dfsg$
/usr/bin/c++ -DBUILDING_QT__ -DENABLE_ASSEMBLER_WX_EXCLUSIVE=1
-DENABLE_DFG_JIT=0 -DENABLE_DFG_JIT_UTILITY_METHODS=1
 -DENABLE_JIT_CONSTANT_BLINDING=0 -DENABLE_LLINT=0 -DJS_EXPORT_PRIVATE=""
-DQT_ASCII_CAST_WARNINGS -DQT_BUILDING_QT -DQT_BUILD_QML_LIB -DQT_CORE_LIB
-DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_UP_TO=0x050
000 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_LEAN_HEADERS=1
-DQT_MOC_COMPAT -DQT_NETWORK_LIB -DQT_NO_AS_CONST -DQT_NO_AS_CONST=1
-DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_EXCEPTIONS -DQT_NO_FOREACH -D
QT_NO_INTEGER_EVENT_COORDINATES -DQT_NO_JAVA_STYLE_ITERATORS
-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QEXCHANGE
-DQT_NO_URL_CAST_FROM_STRING -DQT_QMLINTEGRATION_LIB -DQT_USE_QSTRINGBUILDER
-DQT_WARN_DE
PRECATED_UP_TO=0x07 -DQml_EXPORTS
-DWTFInvokeCrashHook=qmlWTFInvokeCrashHook
-DWTFReportAssertionFailure=qmlWTFReportAssertionFailure
-DWTFReportAssertionFailureWithMessage=qmlWTFReportAssertionFailureWith
Message -DWTFReportBacktrace=qmlWTFReportBacktrace -DWTF_EXPORT_PRIVATE=""
-DWTF_USE_UDIS86=0 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/obj-sparc64-l
inux-gnu/src/qml/Qml_autogen/include
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/obj-sparc64-linux-gnu/include
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/obj-sparc64-linux-gnu/
include/QtQml
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/src/qml
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/obj-sparc64-linux-gnu/src/qml
-I/home/glaubitz/qt6-declarative/qt6-
declarative-6.6.1+dfsg/obj-sparc64-linux-gnu/src/qml/.generated
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/obj-sparc64-linux-gnu/src/qml/compiler
-I/home/glaubitz/qt6-declarative/qt6-declarati
ve-6.6.1+dfsg/obj-sparc64-linux-gnu/src/qml/jsruntime
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/obj-sparc64-linux-gnu/src/qml/memory
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfs
g/obj-sparc64-linux-gnu/src/qml/qmldirparser
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/src/qml/../3rdparty/masm
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/src/qml/../3rdparty
/masm/assembler
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/src/qml/../3rdparty/masm/disassembler
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/src/qml/../3rdparty/masm/disassembl
er/udis86
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/src/qml/../3rdparty/masm/jit
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/src/qml/../3rdparty/masm/runtime
-I/home/glaubitz/
qt6-declarative/qt6-declarative-6.6.1+dfsg/src/qml/../3rdparty/masm/stubs
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/src/qml/../3rdparty/masm/stubs/runtime
-I/home/glaubitz/qt6-declarative/qt6
-declarative-6.6.1+dfsg/src/qml/../3rdparty/masm/stubs/wtf
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/src/qml/../3rdparty/masm/wtf
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/s
rc/qml/compiler
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/src/qml/debugger
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/src/qml/jsruntime
-I/home/glaubitz/qt6-declarative/qt6-d
eclarative-6.6.1+dfsg/src/qml/memory
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/src/qml/qmldirparser
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/obj-sparc64-linux-gnu/include/Q
tQml/6.6.1
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/obj-sparc64-linux-gnu/include/QtQml/6.6.1/QtQml
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/obj-sparc64-linux-gnu/include/
QtQmlIntegration
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/src/qmlintegration
-I/home/glaubitz/qt6-declarative/qt6-declarative-6.6.1+dfsg/obj-sparc64-linux-gnu/src/qmlintegration
-I/home/glau
bitz/qt6-declarative/qt6-declarative-6.6.1+df

[Bug target/113140] [SPARC] [13 Regression] Segmentation fault during RTL pass: dbr

2023-12-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113140

--- Comment #1 from Sam James  ---
Could you try ro tun that failing command again with -save-temps appended, and
then upload qv4qobjectwrapper.ii? It should be somewhere in the builddir.

[Bug target/113140] [SPARC] [13 Regression] Segmentation fault during RTL pass: dbr

2023-12-25 Thread glaubitz at physik dot fu-berlin.de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113140

--- Comment #2 from John Paul Adrian Glaubitz  ---
Created attachment 56940
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56940&action=edit
Preprocessed source from building qt6-declarative with gcc-13

Sure, see attached.

[Bug c++/113141] New: ICE on conversion to reference in aggregate initialization

2023-12-25 Thread de34 at live dot cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113141

Bug ID: 113141
   Summary: ICE on conversion to reference in aggregate
initialization
   Product: gcc
   Version: 13.2.1
Status: UNCONFIRMED
  Keywords: ice-checking, ice-on-invalid-code
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: de34 at live dot cn
  Target Milestone: ---

The following program triggers ICE since GCC 13
(https://godbolt.org/z/PaqWsG9s6):

```
int global_x{};

struct ConvToRef {
operator int&() { return global_x; }
};

struct Foo { int& r; };

int main()
{
Foo bar{ { ConvToRef{} } };
}
```

Clang considers this ill-formed and emits "non-const lvalue reference to type
'int' cannot bind to an initializer list temporary".

If the type of r is changed to const int&, the program correctly compiles with
GCC.

[Bug c++/113142] New: ICE in reference_binding, at cp/call.cc:2020

2023-12-25 Thread accelerator0099 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113142

Bug ID: 113142
   Summary: ICE in reference_binding, at cp/call.cc:2020
   Product: gcc
   Version: 13.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: accelerator0099 at gmail dot com
  Target Milestone: ---

Created attachment 56941
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56941&action=edit
gcc output and preprocessed source

g++ -std=c++20 main.cpp -c

[Bug go/113143] New: Remove usage of ucontext.h

2023-12-25 Thread kallisti5 at unixzen dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143

Bug ID: 113143
   Summary: Remove usage of ucontext.h
   Product: gcc
   Version: 13.2.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: go
  Assignee: ian at airs dot com
  Reporter: kallisti5 at unixzen dot com
  Target Milestone: ---

libgo/sysinfo.c references #include  which breaks the libgo build
on strict POSIX compliance platforms.

ucontext.h was removed in issue 7, and types were migrated to signal.h.

Old 2004 spec:
https://pubs.opengroup.org/onlinepubs/009695399/basedefs/ucontext.h.html


Pretty much any recent spec: (ucontext.h is gone)
https://pubs.opengroup.org/onlinepubs/9699919799/

[Bug go/113143] Remove usage of ucontext.h

2023-12-25 Thread kallisti5 at unixzen dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143

--- Comment #1 from Alexander von Gluck  ---
$ grep -R ucontext.h gcc/libgo

gcc/libgo/configure:#include 
gcc/libgo/configure.ac:#include 
gcc/libgo/go/runtime/runtime2.go:// _sizeof_ucontext_t is defined by
mkrsysinfo.sh from .
gcc/libgo/misc/cgo/testsanitizers/testdata/tsan_shared.go:#include 
gcc/libgo/runtime/go-signal.c:#include 
gcc/libgo/runtime/runtime.h:#include 
gcc/libgo/sysinfo.c:#include 
gcc/libgo/sysinfo.c:// From sys/ucontext.h


pretty much all of these references can be replaced with a signal.h include...
(or wrapped with HAVE_U_CONTEXT_H or whatever if concerned about backwards
compatibility to posix 2004.

[Bug go/113143] Remove usage of ucontext.h

2023-12-25 Thread ian at airs dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113143

--- Comment #2 from Ian Lance Taylor  ---
Note that except on x86_64 GNU/Linux, libgo requires the makecontext,
getcontext, and setcontext functions that are declared in ucontext.h.  There is
no adequate replacement for those functions on strict POSIX systems.  (On
x86_64 GNU/Linux libgo provides assembler versions of those functions (in
libgo/runtime/go-context.S) that are more efficient for libgo's purposes.)

[Bug c++/113141] ICE on conversion to reference in aggregate initialization

2023-12-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113141

Andrew Pinski  changed:

   What|Removed |Added

 CC||accelerator0099 at gmail dot 
com

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

[Bug c++/113142] ICE in reference_binding, at cp/call.cc:2020

2023-12-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113142

Andrew Pinski  changed:

   What|Removed |Added

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

--- Comment #1 from Andrew Pinski  ---
This is a dup of bug 113141. PR 113141 looks to be a reduced version of this
bug, that is looks like the source of PR 113141 was reduced from this testcase.

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

[Bug c++/113141] [13/14 Regression] ICE on conversion to reference in aggregate initialization

2023-12-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113141

Andrew Pinski  changed:

   What|Removed |Added

 Ever confirmed|0   |1
   See Also||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=105766,
   ||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=106201,
   ||https://gcc.gnu.org/bugzill
   ||a/show_bug.cgi?id=94894
   Target Milestone|--- |13.3
   Keywords|ice-checking|
   Last reconfirmed||2023-12-26
 Status|UNCONFIRMED |NEW
Summary|ICE on conversion to|[13/14 Regression] ICE on
   |reference in aggregate  |conversion to reference in
   |initialization  |aggregate initialization

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


I suspect this will bisect to r13-1755-g68f37670eff0b872 .

[Bug target/113140] [SPARC] [13 Regression] Segmentation fault during RTL pass: dbr

2023-12-25 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113140

--- Comment #3 from Andrew Pinski  ---
The obvious workaround is -fno-delayed-branch because this is causing an ICE
during the delay slot scheduling.

[Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)

2023-12-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113144

Bug ID: 113144
   Summary: [14 regression] ICE when building dpkg-1.21.15 in
verify_dominators (error: dominator of 9 should be 48,
not 12)
   Product: gcc
   Version: 14.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Good morning!

Hit this when building dpkg-1.21.15:

```
$ gcc -c tarfn.i -O3 -march=znver2
tarfn.c: In function ‘tar_atosl’:
tarfn.c:195:1: error: dominator of 9 should be 48, not 12
during GIMPLE pass: vect
tarfn.c:195:1: internal compiler error: in verify_dominators, at
dominance.cc:1194
0x561a07fcf5ea verify_dominators(cdi_direction)
   
/usr/src/debug/sys-devel/gcc-14.0.0./gcc-14.0.0./gcc/dominance.cc:1194
0x561a091d1199 checking_verify_dominators(cdi_direction)
   
/usr/src/debug/sys-devel/gcc-14.0.0./gcc-14.0.0./gcc/dominance.h:76
0x561a091d1199 slpeel_tree_duplicate_loop_to_edge_cfg(loop*, edge_def*, loop*,
edge_def*, edge_def*, edge_def**, bool, vec*)
   
/usr/src/debug/sys-devel/gcc-14.0.0./gcc-14.0.0./gcc/tree-vect-loop-manip.cc:1846
0x561a091d3b38 vect_do_peeling(_loop_vec_info*, tree_node*, tree_node*,
tree_node**, tree_node**, tree_node**, int, bool, bool, tree_node**)
   
/usr/src/debug/sys-devel/gcc-14.0.0./gcc-14.0.0./gcc/tree-vect-loop-manip.cc:3307
0x561a091c2dd7 vect_transform_loop(_loop_vec_info*, gimple*)
   
/usr/src/debug/sys-devel/gcc-14.0.0./gcc-14.0.0./gcc/tree-vect-loop.cc:11911
0x561a0920b2f2 vect_transform_loops
   
/usr/src/debug/sys-devel/gcc-14.0.0./gcc-14.0.0./gcc/tree-vectorizer.cc:1006
0x561a0920b956 try_vectorize_loop_1
   
/usr/src/debug/sys-devel/gcc-14.0.0./gcc-14.0.0./gcc/tree-vectorizer.cc:1152
0x561a0920b956 try_vectorize_loop
   
/usr/src/debug/sys-devel/gcc-14.0.0./gcc-14.0.0./gcc/tree-vectorizer.cc:1182
0x561a0920bf74 execute
   
/usr/src/debug/sys-devel/gcc-14.0.0./gcc-14.0.0./gcc/tree-vectorizer.cc:1298
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```

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

[Bug tree-optimization/113144] [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)

2023-12-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113144

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

[Bug tree-optimization/113144] [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)

2023-12-25 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113144

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