Re: [Patch, fortran] PR112460 - [PDT] ICE with parameterized derived types (incorrect code, should be rejected)
Jerry D <[email protected]>
| Newsgroups | gmane.comp.gcc.patches,gmane.comp.gcc.fortran |
|---|---|
| Message-ID | <[email protected]> |
On 1/11/26 5:41 AM, Paul Richard Thomas wrote:
> Hi All,
>
> This patch detects mismatched, constant PDT type specification parameters in
> array constructors and assignment. It is completely straightforward and
> sufficiently described by the ChangeLog.
>
> In preparing the testcase, I noticed that assignment of one PDT variable array
> to another was not being scalarized but, instead being copied directly. While
> this is OK for PDTs with no len parameters, parameterized arrays or strings, it
> is not generally correct. The fix is the one-liner in trans-expr.cc.
>
> Regtests on FC43/x86_64 - OK for mainline?
>
> Paul
>
For the two new functions added can you add comments above each explaining what
they do?
For example:
/* Returns true if the type spec parameters of expr1 are equal to
the type spec parameters of expr2 when the context is .....
+bool
+gfc_check_type_spec_parms (gfc_expr *expr1, gfc_expr *expr2,
+ const char *context)
+{
Otherwise looks ok and tests fine.
Regards,
Jerry