This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR46556 (poor address generation)


On Tue, 11 Oct 2011, Ian Lance Taylor wrote:

> On Tue, Oct 11, 2011 at 4:40 AM, Richard Guenther <rguenther@suse.de> wrote:
> 
> > this function misses to transfer TREE_THIS_NOTRAP which is supposed
> > to be set on the base of old_ref or any contained ARRAY[_RANGE]_REF.
> > If you make the function generic please adjust it to at least do ...
> > ...
> >
> > ? ? ? ? ?TREE_THIS_NOTRAP (new_ref) = TREE_THIS_NOTRAP (base);
> 
> This line was indeed added to the patch as committed.  This appears to have
> broken the build of libgo.  I now get this:
> 
> ../../../gccgo3/libgo/go/image/png/writer.go: In function
> ‘png.writeIDATs.pN23_libgo_image.png.encoder’:
> ../../../gccgo3/libgo/go/image/png/writer.go:403:1: error: statement
> marked for throw, but doesn’t
> # .MEM_775 = VDEF <.MEM_774>
> MEM[base: D.8326_1070, offset: 0B] = VIEW_CONVERT_EXPR<struct
> {
>   uint8 * __values;
>   int __count;
>   int __capacity;
> }>(GOTMP.495);
> 
> ../../../gccgo3/libgo/go/image/png/writer.go:403:1: error: statement
> marked for throw, but doesn’t
> # .MEM_776 = VDEF <.MEM_775>
> D.7574 = MEM[base: D.8325_1069, offset: 0B];
> 
> ../../../gccgo3/libgo/go/image/png/writer.go:403:1: internal compiler
> error: verify_gimple failed
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.
> 
> 
> I have not yet done a full investigation, but it appears that this
> function is now marking
> a newly created reference as TREE_THIS_NOTRAP, which it did not previously do.
> The new instruction is within an exception region, and the tree-cfg
> checker insists that
> instructions in exception region are permitted to trap.  It may be

No, the new stmt seems to have an associated EH region but doesn't
trap.  Now, the old stmt also didn't trap (TREE_THIS_NOTRAP (base) was
true), so the question is why did the checker not complain on it
or, why did it not have an EH region associated but the new stmt does.

> that the ivopts pass
> now requires TODO_cleanup_cfg, or it may be something more complicated.
>
> You should be able to recreate the problem yourself by using
> --enable-languages=go when you run configure.

I suppose you can create a C testcase?

Richard.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]