This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/54935] No way to do if converison
- From: "rguenther at suse dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 15 Oct 2012 15:43:25 +0000
- Subject: [Bug tree-optimization/54935] No way to do if converison
- Auto-submitted: auto-generated
- References: <bug-54935-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54935
--- Comment #4 from rguenther at suse dot de <rguenther at suse dot de> 2012-10-15 15:43:25 UTC ---
On Mon, 15 Oct 2012, joseph at codesourcery dot com wrote:
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54935
>
> --- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-10-15 14:58:14 UTC ---
> On Mon, 15 Oct 2012, rguenth at gcc dot gnu.org wrote:
>
> > We cannot if-convert this because the store to a[i] may trap as it may be
> > in .rodata.
> >
> > That is, the following is valid C:
> >
> > t1.c:
> > const int a[100];
> > const int b[100];
> >
> > t2.c:
> > your testcase
>
> No, that's not valid. int[100] and const int[100] are not compatible
> types.
It happens in real code though :( I suppose we could eventually
relax this though.