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, 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
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.

Ian


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