public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/45455] New: gcc.dg/vect/vect-cond-4.c uses uninitialised variable
@ 2010-08-30 20:28 zsojka at seznam dot cz
2010-08-31 10:01 ` [Bug testsuite/45455] " rguenth at gcc dot gnu dot org
2010-08-31 10:01 ` rguenth at gcc dot gnu dot org
0 siblings, 2 replies; 3+ messages in thread
From: zsojka at seznam dot cz @ 2010-08-30 20:28 UTC (permalink / raw)
To: gcc-bugs
The testcase fails at -O0. It's caused by using 'next_b' at line 13. It might
be 'curr_b' instead.
Strangely, gcc warns only at -O0:
$ gcc-4.6.0-pre9999 gcc.dg/vect/vect-cond-4.c -O0 -Wuninitialized
gcc.dg/vect/vect-cond-4.c: In function 'foo':
gcc.dg/vect/vect-cond-4.c:33:38: warning: 'next_b' may be used uninitialized in
this function [-Wuninitialized]
$ gcc-4.6.0-pre9999 gcc.dg/vect/vect-cond-4.c -O1 -Wuninitialized
$ gcc-4.6.0-pre9999 gcc.dg/vect/vect-cond-4.c -O2 -Wuninitialized
$ gcc-4.6.0-pre9999 gcc.dg/vect/vect-cond-4.c -O3 -Wuninitialized
...
foo (int z)
...
int curr_a, flag, next_a, curr_b, next_b;
...
curr_a = x > c[i] ? curr_a : z;
curr_b = x > c[i] ? next_b : 5;
...
--
Summary: gcc.dg/vect/vect-cond-4.c uses uninitialised variable
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: testsuite
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45455
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-08-31 10:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-30 20:28 [Bug testsuite/45455] New: gcc.dg/vect/vect-cond-4.c uses uninitialised variable zsojka at seznam dot cz
2010-08-31 10:01 ` [Bug testsuite/45455] " rguenth at gcc dot gnu dot org
2010-08-31 10:01 ` rguenth at gcc dot gnu dot 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).