https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102138

--- Comment #9 from Drea Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Drea Pinski from comment #8)
> Created attachment 64839 [details]
> Work in progress
> 
> This is my version of the patch; it is still a works in progress. It does
> not handle the case where a edge is no-longer excutable which we could use
> some fake value for it; maybe 0. 
> 
> 
> It also can be slightly more relaxed when accepting a ssa name. Right now
> the definition of the ssa name needs not to be in the same bb and the use
> stmt needs to be in the same bb.
> 
> I wonder if we could also relax the single use case. One other thing is we
> do this even for all phis args are the same which we don't need to handle as
> we are already going to prop that anyways.


Looks like I am running into a go front-end issue.

So the phi was:
SR.2529_103 = PHI
<&imt..interface_4Info_bfunc_8_9_8io_1fs_0FileInfo_3error_9_cIsDir_bfunc_8_9_8bool_9_cModTime_bfunc_8_9_8time_0Time_9_cMode_bfunc_8_9_8io_1fs_0FileMode_9_cName_bfunc_8_9_8string_9_cSize_bfunc_8_9_8int64_9_cSys_bfunc_8_9_8interface_4_5_9_cType_bfunc_8_9_8io_1fs_0FileMode_9_5..archive_1zip.headerFileInfo(16),
&pimt..interface_4Info_bfunc_8_9_8io_1fs_0FileInfo_3error_9_cIsDir_bfunc_8_9_8bool_9_cModTime_bfunc_8_9_8time_0Time_9_cMode_bfunc_8_9_8io_1fs_0FileMode_9_cName_bfunc_8_9_8string_9_cSize_bfunc_8_9_8int64_9_cSys_bfunc_8_9_8interface_4_5_9_cType_bfunc_8_9_8io_1fs_0FileMode_9_5..archive_1zip.fileListEntry(17)>

The use stmt is:
_37 = SR.2529_103->__type_descriptor

So combing those, and we get a read from a const memory and we get back:
&archive/zip.headerFileInfo..d

BUT the ADDRESSABLE bit was not set:
/home/apinski/src/upstream-gcc/gcc/libgo/go/archive/zip/reader.go: In function
‘archive/zip.openDir.ReadDir’:
/home/apinski/src/upstream-gcc/gcc/libgo/go/archive/zip/reader.go:828:1: error:
address taken, but ADDRESSABLE bit not set
  828 | func (d *openDir) ReadDir(count int) ([]fs.DirEntry, error) {
      | ^
PHI argument
&archive/zip.headerFileInfo..d;
for PHI node

Or I am supposed to do something special here? Or is this a real go front-end
bug? Where the address is in the constructor of the const but TREE_ADDRESSABLE
was not set correctly?

Reply via email to