http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902
--- Comment #13 from Iain Sandoe <iains at gcc dot gnu.org> 2010-12-14 11:55:39
UTC ---
(In reply to comment #12)
> On Mon, 13 Dec 2010, iains at gcc dot gnu.org wrote:
>
> > > > (gdb) print plugindir_string
> > > > $1 = 0xffffffff <Address 0xffffffff out of bounds>
> > > >
> > > > which is the origin of the current fail (there will be other issues
> > > > related to
> > > > the FIXME, I'm sure).
> > >
> > > independent of whether -iplugindir is given on the c/l.
> >
> > in fact, the whole of global_options looks suspiciously un-initialized.
>
> It's supposed to be runtime-initialized from global_options_init; see
> init_options_struct.
[this analysis with the stage1 compiler, I will look again with the stage2
one].
:-(
... we seem to have a miscomputation of the offset to
global_options.x_plugindir_string in the default_plugin_dir_name () function.
; basic block 5
; /GCC/gcc-live-trunk/gcc/plugin.c:883
LM330:
addis r2,r31,ha16(L_global_options$non_lazy_ptr-"L00000000023$pb") ;
tmp129,,
lwz r2,lo16(L_global_options$non_lazy_ptr-"L00000000023$pb")(r2) ;
tmp128,, tmp129
lwz r0,2044(r2) ; global_options.x_plugindir_string, D.22779
===
(gdb) print &global_options
$14 = (struct gcc_options *) 0x4129d920
(gdb) print &global_options.x_plugindir_string
$15 = (const char **) 0x4129e108
(gdb) print/x 0x4129d920 + 2044 (0x7fc)
$17 = 0x4129e11c
=======
rs6000.s:
addis r2,r31,ha16(L_global_options$non_lazy_ptr-"L00000000008$pb") ;
tmp926,,
lwz r2,lo16(L_global_options$non_lazy_ptr-"L00000000008$pb")(r2) ;
tmp925,, tmp926
lwz r0,2044(r2) ; global_options.x_TARGET_ALWAYS_HINT, D.70115
======
Have to think of how to pursue this further...