Re: [Patch, Fortran, OOP] PR 47978: Invalid INTENT in overriding TBP not detected

2011-09-11 Thread Janus Weil
Update: Here is an extended version of the patch, which adds a few additional checks: * a simple check for the array shape (not complete yet, but fixing at least comment #0 of PR 35831) * a check for the string length, as recently implemented for character results (PR49638) * furthermore it

Re: [Patch, Fortran, OOP] PR 47978: Invalid INTENT in overriding TBP not detected

2011-09-11 Thread Tobias Burnus
Janus Weil wrote: Update: Here is an extended version of the patch, which adds a few additional checks: The patch still regtests cleanly. Ok for trunk? + switch (compval) + { ... + default: + gfc_internal_error (check_dummy_characteristics: Unexpected result +

Re: [Patch, Fortran, OOP] PR 47978: Invalid INTENT in overriding TBP not detected

2011-09-11 Thread Janus Weil
Hi Tobias, Update: Here is an extended version of the patch, which adds a few additional checks: The patch still regtests cleanly. Ok for trunk? +      switch (compval) +      { ... +       default: +         gfc_internal_error (check_dummy_characteristics: Unexpected result +      

Re: [Patch, Fortran, OOP] PR 47978: Invalid INTENT in overriding TBP not detected

2011-09-11 Thread Janus Weil
+      switch (compval) +      { ... +       default: +         gfc_internal_error (check_dummy_characteristics: Unexpected result +                             %i of gfc_dep_compare_expr, compval); +         break; +      } +    } I think we really should move to enum. Agreed.

[Patch, Fortran, OOP] PR 47978: Invalid INTENT in overriding TBP not detected

2011-09-09 Thread Janus Weil
Hi all, here is another small patch for an accepts-invalid OOP problem: When overriding a type-bound procedure, we need to check that the intents of the formal args agree (or more general: their 'characteristics', as defined in chapter 12.3.2 of the F08 standard). For now I'm only checking