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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jakub at gcc dot gnu.org

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 39466
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39466&action=edit
gcc7-pr67496.patch

Untested fix.  u.cl is obviously valid only for type == BT_CHARACTER, for
e.g. BT_DERIVED in the testcase it is u.derived instead.  So, trying to
unconditionally dereference it is invalid.  Not to mention if the type happens
to be BT_HOLLERITH, then it could have non-zero u.pad, so u.cl could be
non-NULL, yet it wouldn't be even a valid pointer.

Reply via email to