Bug 44726 - [4.6 Regression] Yet another broken bootstrap
Summary: [4.6 Regression] Yet another broken bootstrap
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: 4.6.0
Assignee: Sebastian Pop
URL:
Keywords:
: 44730 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-06-30 15:35 UTC by Dominique d'Humieres
Modified: 2010-06-30 18:38 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-06-30 16:11:19


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique d'Humieres 2010-06-30 15:35:31 UTC
At revision 161606, bootstrap fails with:

...

/opt/gcc/build_w/./prev-gcc/xgcc -B/opt/gcc/build_w/./prev-gcc/ -B/opt/gcc/gcc4.6w/x86_64-apple-darwin10.4.0/bin/ -B/opt/gcc/gcc4.6w/x86_64-apple-darwin10.4.0/bin/ -B/opt/gcc/gcc4.6w/x86_64-apple-darwin10.4.0/lib/ -isystem /opt/gcc/gcc4.6w/x86_64-apple-darwin10.4.0/include -isystem /opt/gcc/gcc4.6w/x86_64-apple-darwin10.4.0/sys-include    -c   -g -O2 -gtoggle -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../work/gcc -I../../work/gcc/. -I../../work/gcc/../include -I../../work/gcc/../libcpp/include -I/opt/sw64/include  -I../../work/gcc/../libdecnumber -I../../work/gcc/../libdecnumber/dpd -I../libdecnumber  -I/opt/sw64/include -DCLOOG_PPL_BACKEND   -I/opt/sw64/include ../../work/gcc/graphite-sese-to-poly.c -o graphite-sese-to-poly.o
/opt/gcc/build_w/./prev-gcc/xgcc -B/opt/gcc/build_w/./prev-gcc/ -B/opt/gcc/gcc4.6w/x86_64-apple-darwin10.4.0/bin/ -B/opt/gcc/gcc4.6w/x86_64-apple-darwin10.4.0/bin/ -B/opt/gcc/gcc4.6w/x86_64-apple-darwin10.4.0/lib/ -isystem /opt/gcc/gcc4.6w/x86_64-apple-darwin10.4.0/include -isystem /opt/gcc/gcc4.6w/x86_64-apple-darwin10.4.0/sys-include    -c   -g -O2 -gtoggle -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../work/gcc -I../../work/gcc/. -I../../work/gcc/../include -I../../work/gcc/../libcpp/include -I/opt/sw64/include  -I../../work/gcc/../libdecnumber -I../../work/gcc/../libdecnumber/dpd -I../libdecnumber  -I/opt/sw64/include -DCLOOG_PPL_BACKEND   -I/opt/sw64/include gtype-desc.c -o gtype-desc.o
../../work/gcc/graphite-sese-to-poly.c: In function 'build_scop_drs.isra.110':
../../work/gcc/graphite-sese-to-poly.c:1784:15: error: 'dr_base_object_set' may be used uninitialized in this function [-Werror=uninitialized]
../../work/gcc/graphite-sese-to-poly.c:1765:7: note: 'dr_base_object_set' was declared here
../../work/gcc/graphite-sese-to-poly.c:2008:25: error: 'bap' may be used uninitialized in this function [-Werror=uninitialized]
../../work/gcc/graphite-sese-to-poly.c:2003:24: note: 'bap' was declared here
../../work/gcc/graphite-sese-to-poly.c:1929:22: error: 'bap' may be used uninitialized in this function [-Werror=uninitialized]
../../work/gcc/graphite-sese-to-poly.c:1924:24: note: 'bap' was declared here
cc1: all warnings being treated as errors

I have reached stage 3 with the following uneducated patch:


--- /opt/gcc/_clean/gcc/graphite-sese-to-poly.c	2010-06-10 00:11:15.000000000 +0200
+++ /opt/gcc/work/gcc/graphite-sese-to-poly.c	2010-06-30 17:18:25.000000000 +0200
@@ -1762,7 +1762,7 @@ build_poly_dr (data_reference_p dr, poly
   ppl_Pointset_Powerset_C_Polyhedron_t accesses_ps;
   ppl_dimension_type dom_nb_dims;
   ppl_dimension_type accessp_nb_dims;
-  int dr_base_object_set;
+  int dr_base_object_set = 0;
 
   ppl_Pointset_Powerset_C_Polyhedron_space_dimension (PBB_DOMAIN (pbb),
 						      &dom_nb_dims);
@@ -1921,7 +1921,7 @@ build_alias_set_optimal_p (VEC (data_ref
   for (i = 0; i < g->n_vertices; i++)
     {
       data_reference_p dr = VEC_index (data_reference_p, drs, i);
-      base_alias_pair *bap;
+      base_alias_pair *bap = NULL;
 
       if (dr->aux)
 	bap = (base_alias_pair *)(dr->aux);
@@ -2000,7 +2000,7 @@ build_base_obj_set_for_drs (VEC (data_re
   for (i = 0; i < g->n_vertices; i++)
     {
       data_reference_p dr = VEC_index (data_reference_p, drs, i);
-      base_alias_pair *bap;
+      base_alias_pair *bap = NULL;
 
       if (dr->aux)
 	bap = (base_alias_pair *)(dr->aux);
Comment 1 Sebastian Pop 2010-06-30 16:11:19 UTC
Mine.

Let's transform this code:
      base_alias_pair *bap;

      if (dr->aux)
	bap = (base_alias_pair *)(dr->aux);

into:
      base_alias_pair *bap;

      gcc_assert (dr->aux);
      bap = (base_alias_pair *)(dr->aux);
Comment 2 H.J. Lu 2010-06-30 16:19:41 UTC
*** Bug 44730 has been marked as a duplicate of this bug. ***
Comment 3 Richard Biener 2010-06-30 18:38:51 UTC
Fixed.
Comment 4 Richard Biener 2010-06-30 18:39:13 UTC
Subject: Bug 44726

Author: rguenth
Date: Wed Jun 30 18:38:37 2010
New Revision: 161631

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161631
Log:
2010-06-30  Sebastian Pop  <sebastian.pop@amd.com>

	PR bootstrrap/44726
	* graphite-sese-to-poly.c (build_poly_dr): Avoid uninitialized
	use.
	(build_alias_set_optimal_p): Likewise.
	(build_base_obj_set_for_drs): Likewise.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/graphite-sese-to-poly.c