Hi Sandra, That's a good shout to query suppress_errors. The patch is OK by me.
Thanks Paul On Wed, 5 Jan 2022 at 03:21, Sandra Loosemore <san...@codesourcery.com> wrote: > This patch fixes an ICE that appeared after I checked in my patch for > PR101337 back in November, which made the resolve phase try harder to > check all operands/arguments for errors instead of giving up after the > first one, but it's actually a bug that existed before that and was only > revealed by that earlier patch. > > The problem is that the parse phase is doing early resolution to try to > constant-fold a character length expression. It's throwing away the > error(s) if it fails, but in the test case for this issue it was leaving > behind some state indicating that the error had already been diagnosed > so it wasn't getting caught again during the "real" resolution phase > either. > > Every bit of code touched by this seems kind of hacky to me -- the > different mechanisms for suppressing/ignoring errors, the magic bit in > the symbol attributes, the part that tries to constant-fold an > expression that might not actually be a constant, etc. But, this is the > least hacky fix I could come up with. :-P It fixes the test case from > the issue and does not cause any regressions elsewhere in the gfortran > testsuite. > > OK to check in? > > -Sandra > -- "If you can't explain it simply, you don't understand it well enough" - Albert Einstein