Bug 47595 - c-c++-common/uninit-17.c fails test for warnings when -fgraphite-identity enabled at -O2
c-c++-common/uninit-17.c fails test for warnings when -fgraphite-identity ena...
Status: UNCONFIRMED
Product: gcc
Classification: Unclassified
Component: middle-end
4.6.0
: P3 normal
: ---
Assigned To: Not yet assigned to anyone
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-03 01:16 UTC by Jack Howarth
Modified: 2011-02-03 01:33 UTC (History)
2 users (show)

See Also:
Host: x86_64-apple-darwin10
Target: x86_64-apple-darwin10
Build: x86_64-apple-darwin10
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Howarth 2011-02-03 01:16:28 UTC
When -fgraphite-identity is enabled in gcc trunk at -O2 like the graphite branch...

Index: gcc/opts.c
===================================================================
--- gcc/opts.c	(revision 169512)
+++ gcc/opts.c	(working copy)
@@ -459,6 +459,9 @@ static const struct default_options defa
     { OPT_LEVELS_1_PLUS, OPT_fcompare_elim, NULL, 1 },
 
     /* -O2 optimizations.  */
+#ifdef HAVE_cloog
+    { OPT_LEVELS_2_PLUS, OPT_fgraphite_identity, NULL, 1 },
+#endif
     { OPT_LEVELS_2_PLUS, OPT_finline_small_functions, NULL, 1 },
     { OPT_LEVELS_2_PLUS, OPT_findirect_inlining, NULL, 1 },
     { OPT_LEVELS_2_PLUS, OPT_fpartial_inlining, NULL, 1 },

The failures...

FAIL: c-c++-common/uninit-17.c  (test for warnings, line 12)
FAIL: c-c++-common/uninit-17.c  (test for warnings, line 16)
FAIL: c-c++-common/uninit-17.c (test for excess errors)

occur. These are of the form...

Executing on host: /sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/testsuite/g++/../../g++ -B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/testsuite/g++/../../ /sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/gcc/testsuite/c-c++-common/uninit-17.c  -nostdinc++ -I/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.7.0/i386/libstdc++-v3/include/x86_64-apple-darwin10.7.0 -I/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.7.0/i386/libstdc++-v3/include -I/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/libstdc++-v3/libsupc++ -I/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/libstdc++-v3/include/backward -I/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/libstdc++-v3/testsuite/util -fmessage-length=0  -O2 -Wuninitialized -fno-ivopts  -S  -m32 -o uninit-17.s    (timeout = 300)
/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/gcc/testsuite/c-c++-common/uninit-17.c: In function 'void foobar(int, int*)':^M
/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/gcc/testsuite/c-c++-common/uninit-17.c:21:6: warning: 'b' is used uninitialized in this function [-Wuninitialized]^M
output is:
/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/gcc/testsuite/c-c++-common/uninit-17.c: In function 'void foobar(int, int*)':^M
/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/gcc/testsuite/c-c++-common/uninit-17.c:21:6: warning: 'b' is used uninitialized in this function [-Wuninitialized]^M

FAIL: c-c++-common/uninit-17.c  (test for warnings, line 12)
FAIL: c-c++-common/uninit-17.c  (test for warnings, line 16)
FAIL: c-c++-common/uninit-17.c (test for excess errors)

and look similar to those in the fixed PR44738.
Comment 1 Jack Howarth 2011-02-03 01:33:24 UTC
This seems to be specific to the bootstrap with -fgraphite-identity at -O2. The warnings appear as...

/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/testsuite/g++/../../g++ -B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/testsuite/g++/../../ /sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/gcc/testsuite/c-c++-common/uninit-17.c -nostdinc++ -I/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.7.0/i386/libstdc++-v3/include/x86_64-apple-darwin10.7.0 -I/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.7.0/i386/libstdc++-v3/include -I/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/libstdc++-v3/libsupc++ -I/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/libstdc++-v3/include/backward -I/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/libstdc++-v3/testsuite/util -fmessage-length=0 -O2 -Wuninitialized -fno-ivopts -S -m32 -fgraphite-identity -o uninit-17.s
/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/gcc/testsuite/c-c++-common/uninit-17.c: In function ‘void foobar(int, int*)’:
/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/gcc/testsuite/c-c++-common/uninit-17.c:21:6: warning: ‘b’ is used uninitialized in this function [-Wuninitialized]

when -fgraphite-identity is passed but also as...

/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/testsuite/g++/../../g++ -B/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/gcc/testsuite/g++/../../ /sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/gcc/testsuite/c-c++-common/uninit-17.c -nostdinc++ -I/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.7.0/i386/libstdc++-v3/include/x86_64-apple-darwin10.7.0 -I/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.7.0/i386/libstdc++-v3/include -I/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/libstdc++-v3/libsupc++ -I/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/libstdc++-v3/include/backward -I/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/libstdc++-v3/testsuite/util -fmessage-length=0 -O2 -Wuninitialized -fno-ivopts -S -m32 -fno-graphite-identity -o uninit-17.s
/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/gcc/testsuite/c-c++-common/uninit-17.c: In function ‘void foobar(int, int*)’:
/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/gcc/testsuite/c-c++-common/uninit-17.c:16:11: warning: ‘b’ may be used uninitialized in this function [-Wuninitialized]
/sw/src/fink.build/gcc46-4.6.0-1000/gcc-4.6-20110202/gcc/testsuite/c-c++-common/uninit-17.c:12:9: note: ‘b’ was declared here

when -fno-graphite-identity is passed.