public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/110652] New: [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized
@ 2023-07-13 9:23 slyfox at gcc dot gnu.org
2023-07-13 15:12 ` [Bug tree-optimization/110652] " pinskia at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: slyfox at gcc dot gnu.org @ 2023-07-13 9:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110652
Bug ID: 110652
Summary: [14 Regression] bootstrap failure on
tree-vect-stmts.cc with --enable-checking=release:
error: 'new_temp' may be used uninitialized
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: slyfox at gcc dot gnu.org
Target Milestone: ---
Noticed build failure today when built r14-2495-g43ed05a08963a5 as:
$ ~/dev/git/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-stmts.o -MT
tree-vect-stmts.o -MMD -MP -MF ./.deps/tree-vect-stmts.TPo
/home/slyfox/dev/git/gcc/gcc/tree-vect-stmts.cc
In file included from /home/slyfox/dev/git/gcc/gcc/hash-table.h:248,
from /home/slyfox/dev/git/gcc/gcc/coretypes.h:486,
from /home/slyfox/dev/git/gcc/gcc/tree-vect-stmts.cc:24:
In member function 'T* vec<T, A, vl_embed>::quick_push(const T&) [with T =
tree_node*; A = va_heap]',
inlined from 'T* vec<T>::quick_push(const T&) [with T = tree_node*]' at
/home/slyfox/dev/git/gcc/gcc/vec.h:1987:28,
inlined from 'bool vectorizable_load(vec_info*, stmt_vec_info,
gimple_stmt_iterator*, gimple**, slp_tree, stmt_vector_for_cost*)' at
/home/slyfox/dev/git/gcc/gcc/tree-vect-stmts.cc:10962:23:
/home/slyfox/dev/git/gcc/gcc/vec.h:1023:9: error: 'new_temp' may be used
uninitialized [-Werror=maybe-uninitialized]
1023 | *slot = obj;
| ~~~~~~^~~~~
$ /tmp/gb/./prev-gcc/xg++ -B/tmp/gb/./prev-gcc/ -v
Reading specs from /tmp/gb/./prev-gcc/specs
COLLECT_GCC=/tmp/gb/./prev-gcc/xg++
COLLECT_LTO_WRAPPER=/tmp/gb/./prev-gcc/lto-wrapper
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 20230713 (experimental) (GCC)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/110652] [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized
2023-07-13 9:23 [Bug tree-optimization/110652] New: [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized slyfox at gcc dot gnu.org
@ 2023-07-13 15:12 ` pinskia at gcc dot gnu.org
2023-07-13 15:15 ` pinskia at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-13 15:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110652
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.0
Keywords| |build, diagnostic
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/110652] [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized
2023-07-13 9:23 [Bug tree-optimization/110652] New: [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized slyfox at gcc dot gnu.org
2023-07-13 15:12 ` [Bug tree-optimization/110652] " pinskia at gcc dot gnu.org
@ 2023-07-13 15:15 ` pinskia at gcc dot gnu.org
2023-07-13 18:53 ` slyfox at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-13 15:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110652
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
new_temp does look like it is initialized on the !costing_p path too ..
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/110652] [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized
2023-07-13 9:23 [Bug tree-optimization/110652] New: [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized slyfox at gcc dot gnu.org
2023-07-13 15:12 ` [Bug tree-optimization/110652] " pinskia at gcc dot gnu.org
2023-07-13 15:15 ` pinskia at gcc dot gnu.org
@ 2023-07-13 18:53 ` slyfox at gcc dot gnu.org
2023-07-14 1:04 ` linkw at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: slyfox at gcc dot gnu.org @ 2023-07-13 18:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110652
Sergei Trofimovich <slyfox at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |linkw at gcc dot gnu.org
--- Comment #2 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
If it helps bisect landed on r14-2493-g5f03844b32f452
commit 5f03844b32f45224c33dcea08a20b5a2089082f7
Author: Kewen Lin <linkw@linux.ibm.com>
Date: Wed Jul 12 21:23:22 2023 -0500
vect: Adjust vectorizable_load costing on VMAT_CONTIGUOUS_REVERSE
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/110652] [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized
2023-07-13 9:23 [Bug tree-optimization/110652] New: [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized slyfox at gcc dot gnu.org
` (2 preceding siblings ...)
2023-07-13 18:53 ` slyfox at gcc dot gnu.org
@ 2023-07-14 1:04 ` linkw at gcc dot gnu.org
2023-07-14 2:55 ` linkw at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-07-14 1:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110652
Kewen Lin <linkw at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-07-14
Ever confirmed|0 |1
Status|UNCONFIRMED |ASSIGNED
--- Comment #3 from Kewen Lin <linkw at gcc dot gnu.org> ---
Thanks for reporting and I'll have a look.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/110652] [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized
2023-07-13 9:23 [Bug tree-optimization/110652] New: [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized slyfox at gcc dot gnu.org
` (3 preceding siblings ...)
2023-07-14 1:04 ` linkw at gcc dot gnu.org
@ 2023-07-14 2:55 ` linkw at gcc dot gnu.org
2023-07-14 6:04 ` linkw at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-07-14 2:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110652
--- Comment #4 from Kewen Lin <linkw at gcc dot gnu.org> ---
I can't reproduce this on ppc64le with both the default bootstrapping checking
option --enable-checking=yes,extra and the reported --enable-checking=release.
I'm going to test it on cfarm x86 machine.
If the error message lineno is correct, it complains on line 10962:
/* Collect vector loads and later create their permutation in
vect_transform_grouped_load (). */
if (!costing_p && (grouped_load || slp_perm))
dr_chain.quick_push (new_temp); // line 10962
It's guarded with !costing_p and we have:
/* One common place to cost the above vect load for different
alignment support schemes. */
if (costing_p)
{
...
}
else
{
vec_dest = vect_create_destination_var (scalar_dest,
vectype);
...
new_temp = make_ssa_name (vec_dest, new_stmt); // line 10911
...
}
at line 10911, new_temp is always initialized for !costing_p. It looks like a
false positive.
Anyway, I'll reproduce it first on x86.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/110652] [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized
2023-07-13 9:23 [Bug tree-optimization/110652] New: [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized slyfox at gcc dot gnu.org
` (4 preceding siblings ...)
2023-07-14 2:55 ` linkw at gcc dot gnu.org
@ 2023-07-14 6:04 ` linkw at gcc dot gnu.org
2023-07-14 8:27 ` rguenther at suse dot de
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-07-14 6:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110652
Kewen Lin <linkw at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--- Comment #5 from Kewen Lin <linkw at gcc dot gnu.org> ---
I can reproduce this on cfarm x86 machine, the complained line is exactly the
one in comment #c4, I believe it's a false positive.
How do we work around this normally? Just initializing new_temp with NULL_TREE
as below?
diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc
index c08d0ef951f..124caab5c1f 100644
--- a/gcc/tree-vect-stmts.cc
+++ b/gcc/tree-vect-stmts.cc
@@ -9297,7 +9297,7 @@ vectorizable_load (vec_info *vinfo,
class loop *containing_loop = gimple_bb (stmt_info->stmt)->loop_father;
bool nested_in_vect_loop = false;
tree elem_type;
- tree new_temp;
+ tree new_temp = NULL_TREE;
machine_mode mode;
tree dummy;
tree dataref_ptr = NULL_TREE;
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/110652] [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized
2023-07-13 9:23 [Bug tree-optimization/110652] New: [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized slyfox at gcc dot gnu.org
` (5 preceding siblings ...)
2023-07-14 6:04 ` linkw at gcc dot gnu.org
@ 2023-07-14 8:27 ` rguenther at suse dot de
2023-07-15 0:34 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenther at suse dot de @ 2023-07-14 8:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110652
--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> ---
On Fri, 14 Jul 2023, linkw at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110652
>
> Kewen Lin <linkw at gcc dot gnu.org> changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> CC| |rguenth at gcc dot gnu.org
>
> --- Comment #5 from Kewen Lin <linkw at gcc dot gnu.org> ---
> I can reproduce this on cfarm x86 machine, the complained line is exactly the
> one in comment #c4, I believe it's a false positive.
>
> How do we work around this normally? Just initializing new_temp with NULL_TREE
> as below?
Yes, possibly with a comment refering to this PR.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/110652] [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized
2023-07-13 9:23 [Bug tree-optimization/110652] New: [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized slyfox at gcc dot gnu.org
` (6 preceding siblings ...)
2023-07-14 8:27 ` rguenther at suse dot de
@ 2023-07-15 0:34 ` pinskia at gcc dot gnu.org
2023-07-17 8:45 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-15 0:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110652
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |danglin at gcc dot gnu.org
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 110672 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/110652] [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized
2023-07-13 9:23 [Bug tree-optimization/110652] New: [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized slyfox at gcc dot gnu.org
` (7 preceding siblings ...)
2023-07-15 0:34 ` pinskia at gcc dot gnu.org
@ 2023-07-17 8:45 ` cvs-commit at gcc dot gnu.org
2023-07-17 8:46 ` linkw at gcc dot gnu.org
2023-07-17 10:33 ` slyfox at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-17 8:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110652
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Kewen Lin <linkw@gcc.gnu.org>:
https://gcc.gnu.org/g:081c623ca88dc53abe34b5f5661e79fcde800cef
commit r14-2560-g081c623ca88dc53abe34b5f5661e79fcde800cef
Author: Kewen Lin <linkw@linux.ibm.com>
Date: Mon Jul 17 03:44:59 2023 -0500
vect: Initialize new_temp to avoid false positive warning [PR110652]
As PR110652 and its duplicate PRs show, there could be one
build error
error: 'new_temp' may be used uninitialized
for some build configurations. It's a false positive warning
(or error at -Werror), but in order to make the build succeed,
this patch is to initialize the reported variable 'new_temp'
as NULL_TREE.
PR tree-optimization/110652
gcc/ChangeLog:
* tree-vect-stmts.cc (vectorizable_load): Initialize new_temp as
NULL_TREE.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/110652] [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized
2023-07-13 9:23 [Bug tree-optimization/110652] New: [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized slyfox at gcc dot gnu.org
` (8 preceding siblings ...)
2023-07-17 8:45 ` cvs-commit at gcc dot gnu.org
@ 2023-07-17 8:46 ` linkw at gcc dot gnu.org
2023-07-17 10:33 ` slyfox at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: linkw at gcc dot gnu.org @ 2023-07-17 8:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110652
Kewen Lin <linkw at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #9 from Kewen Lin <linkw at gcc dot gnu.org> ---
Should be fixed on trunk.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/110652] [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized
2023-07-13 9:23 [Bug tree-optimization/110652] New: [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized slyfox at gcc dot gnu.org
` (9 preceding siblings ...)
2023-07-17 8:46 ` linkw at gcc dot gnu.org
@ 2023-07-17 10:33 ` slyfox at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: slyfox at gcc dot gnu.org @ 2023-07-17 10:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110652
--- Comment #10 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
I confirm the change fixed build for me (it also needed unrelated workaround
for https://gcc.gnu.org/PR110697). Thank you!
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-07-17 10:33 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-13 9:23 [Bug tree-optimization/110652] New: [14 Regression] bootstrap failure on tree-vect-stmts.cc with --enable-checking=release: error: 'new_temp' may be used uninitialized slyfox at gcc dot gnu.org
2023-07-13 15:12 ` [Bug tree-optimization/110652] " pinskia at gcc dot gnu.org
2023-07-13 15:15 ` pinskia at gcc dot gnu.org
2023-07-13 18:53 ` slyfox at gcc dot gnu.org
2023-07-14 1:04 ` linkw at gcc dot gnu.org
2023-07-14 2:55 ` linkw at gcc dot gnu.org
2023-07-14 6:04 ` linkw at gcc dot gnu.org
2023-07-14 8:27 ` rguenther at suse dot de
2023-07-15 0:34 ` pinskia at gcc dot gnu.org
2023-07-17 8:45 ` cvs-commit at gcc dot gnu.org
2023-07-17 8:46 ` linkw at gcc dot gnu.org
2023-07-17 10:33 ` slyfox at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).