This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/80965] [7/8 Regression] ICE with class argument and -O2 optimization
- From: "pault at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 09 Jun 2017 11:28:20 +0000
- Subject: [Bug fortran/80965] [7/8 Regression] ICE with class argument and -O2 optimization
- Auto-submitted: auto-generated
- References: <bug-80965-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80965
--- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> ---
Created attachment 41519
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41519&action=edit
Patch for the bug
This appears to be a consequence of r241450, which fixed PR69834 (select type
clashes).
The fix depended on selection of the address of the selector vtable, which I
obtained using the intrinsic LOC function. In building the function call, I
used the name 'loc' for the symtree, which meant that all references to the
class object 'loc' picked up the intrinsic function. Changing the selecting
intrinsic name to '_loc' seems to fix the problem and all the select type
testcases regtest OK.
I am in the middle of working on a massive patch for PR34640 and so will come
back to this PR as soon as a I can.
Cheers
Paul