This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/66089] [6 Regression] elemental dependency mishandling when derived types are involved
- From: "mikael at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 06 Feb 2016 20:34:17 +0000
- Subject: [Bug fortran/66089] [6 Regression] elemental dependency mishandling when derived types are involved
- Auto-submitted: auto-generated
- References: <bug-66089-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66089
--- Comment #14 from Mikael Morin <mikael at gcc dot gnu.org> ---
Created attachment 37613
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37613&action=edit
Fix for comment #10
This is sufficient to fix comment #10.
It removes the optional attribute on c(1) if c is optional.
Then the can_be_null_ref attribute is not set during scalarization, and
gfc_scalar_elemental_arg_saved_as_reference returns false.
I'm not sure this is actually correct; should we consider c(1) optional if c is
optional?