This is the mail archive of the gcc-bugs@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]

[Bug fortran/69398] [OOP] ICE on class with duplicate dimension attribute specified


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

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pault at gcc dot gnu.org

--- Comment #5 from janus at gcc dot gnu.org ---
(In reply to janus from comment #4) 
> The problem is that the class container is built too early (and thus we
> build a container for a scalar class variable).

To fix this, we have the following options:
1) "Rebuild" the class container when the relevant attributes change (such as
DIMENSION). That is probably the simplest solution, but a bit inefficient,
since we build containers that we don't need.
2) Or: Defer the container building to resolution stage, at least for scalar
class variables, since we don't know if a dimension declaration follows
somewhere after the class declaration. This might be a bit more tricky.
3) Defer the container building to resolution stage for all class variables, no
matter if it would be possible earlier. This might be the cleanest solution,
but might require major reworking of CLASS-specific code.

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