This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/12039] [tree-ssa] [unit-at-a-time] does not mark static variable as used.
- From: "judd dot jenne at charter dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Aug 2003 03:33:13 -0000
- Subject: [Bug optimization/12039] [tree-ssa] [unit-at-a-time] does not mark static variable as used.
- References: <20030823032515.12039.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12039
------- Additional Comments From judd dot jenne at charter dot net 2003-08-31 03:33 -------
[Brought in from gcc mailing list.]
Andrew,
First of all, thank you for looking into this.
I produced these using an ssa compiler from the last few hours. I hope this helps.
I used something like -fdump-tree-all. I didn't include dumps that
seemed identical to those prior.
It seems that rewrite_out_of_ssa() seems a likely culprit from examining
dumps .dce and .optimized.
Off Topic:
[snipped]
Various Files:
// tc1.c
static int
foo(int n) {
static int yy = 0;
yy = n;
return yy;
}
int
main(void)
{
int pp;
pp = foo(3);
return pp;
}
// tc1.c.t02.original
;; Function foo (foo)
;; enabled by -tree-original
{
static int yy = 0;
yy = n;
return <return-value> = yy;
}
;; Function main (main)
;; enabled by -tree-original
{
int pp;
pp = foo(3);
return <return-value> = pp;
}
// tc1.c.t03.generic
;; Function foo (foo)
foo (n)
{
static int yy = 0;
yy = n;
return yy;;
}
;; Function main (main)
main ()
{
int T.1;
int pp;
T.1 = foo (3);
pp = T.1;
return pp;;
}
// tc1.c.t05.gimple
;; Function main (main)
main ()
{
int retval.2;
int T.1;
int pp;
{
int n;
int <UVecb0>;
n = 3;
{
static int yy = 0;
yy = n;
{
<UVecb0> = yy;
goto <ULec40>;;
};
};
<ULec40>:;;
retval.2 = <UVecb0>;
};
T.1 = retval.2;
pp = T.1;
return pp;;
}
// tc1.c.t09.ssa
;; Function main (main)
main ()
{
int retval.2;
int T.1;
int pp;
{
int n;
int <UVecb0>;
n_1 = 3;
{
static int yy = 0;
yy = 3;
<UVecb0>_4 = 3;
goto <ULec40>;;
};
<ULec40>:;;
retval.2_5 = 3;
};
T.1_6 = 3;
pp_7 = 3;
return 3;;
}
// tc1.c.t13.pre
;; Function main (main)
main ()
{
int retval.2;
int T.1;
int pp;
{
int n;
int <UVecb0>;
(void)0;
{
static int yy = 0;
yy = 3;
(void)0;
goto <ULec40>;;
};
<ULec40>:;;
(void)0;
};
(void)0;
(void)0;
return 3;;
}
// tc1.c.t17.optimized
;; Function main (main)
main ()
{
{
yy = 3;
<ULec40>:;;
};
return 3;;
}
Judd
[snipped]