Dear Fortranners, while working on a fix for PR102685, I encountered issues with the testsuite. In this cases I think the testcase code is invalid, and it is correctly rejected by e.g. Intel although currently accepted by gfortran.
Strangely enough. (1) gfortran.dg/derived_constructor_char_1.f90 The constructor is shorter than the array component txt in DT t5. Commit r0-101989. @Tobias: can you comment? (2) gfortran.dg/pr70931.f90 Committed by Richard Biener, fixing an ICE on an invalid testcase by Gerhard. I think we safely can mark this one as invalid and emit an error, right? (3) gfortran.dg/transfer_simplify_2.f90 The constructor has more elements than the array component in the DT and is invalid. Commit r0-80854. @Paul: can you comment? To proceed, I think we can treat (2) as erroneous and emit an error instead of silently accepting the testcase, which has too many elements in the constructor. Along these lines, I think we should always reject code having too many elements in a constructor. Is there agreement on this? This would need fixing case (3). Is there a reason to accept cases where the constructor is shorter than the array component in the DT? Some extension? Shall we give a warning for these cases instead of an error? Based on -std flags? Any constructive comment appreciated! Thanks, Harald