From: Harald Anlauf <anlauf@gmx.de>
To: fortran@gcc.gnu.org
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH, v2] Fortran: handle bad array ctors with typespec [PR93483, , PR107216, PR107219]
Date: Mon, 17 Oct 2022 19:31:43 +0200 [thread overview]
Message-ID: <f4bf6364-6829-4641-c4df-5ea638932e6d@gmx.de> (raw)
Message-ID: <20221017173143.87bfqaJk7x1SqESfcuv_tf36-jAJrE6KJgKM3MwwK7E@z> (raw)
In-Reply-To: <01143700-424c-ba84-6e95-c8b3573741f5@orange.fr>
Hi Mikael,
Am 16.10.22 um 23:17 schrieb Mikael Morin:
> Le 15/10/2022 à 22:15, Harald Anlauf via Fortran a écrit :
>> Dear all,
>>
>> here is an updated version of the patch that includes suggestions
>> and comments by Mikael in PR93483.
>>
>> Basic new features are:
>> - a new enum value ARITH_NOT_REDUCED to keep track if we encountered
>> an expression that was not reduced via reduce_unary/reduce_binary
>> - a cleanup of the related checking, resulting in more readable
>> code.
>> - a new testcase by Mikael that exhibited a flaw in the first patch
>> due to a false resolution of a symbol by premature simplification.
>>
>> Regtested again. OK for mainline?
>>
> (...)
>> diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
>> index 10bb098d136..7b8f0b148bd 100644
>> --- a/gcc/fortran/gfortran.h
>> +++ b/gcc/fortran/gfortran.h
>> @@ -222,11 +222,12 @@ enum gfc_intrinsic_op
>> Assumptions are made about the numbering of the interface_op
>> enums. */
>> #define GFC_INTRINSIC_OPS GFC_INTRINSIC_END
>>
>> -/* Arithmetic results. */
>> +/* Arithmetic results. ARITH_NOT_REDUCED is used to keep track of
>> failed
>> + reductions because an erroneous expression was encountered. */
>
> The expressions are not always erroneous. They can be, but in the
> testcase for example, all the expressions are valid. They are just
> unsupported by the arithmetic evaluation code which works only with
> literal constants and arrays of literal constants (and arrays of arrays
> etc).
>
> OK with that comment fixed.
you're absolutely right. I adjusted the comment and the commit
message according to your suggestion.
Pushed as https://gcc.gnu.org/g:d45af5c2eb1ba1e48449d8f3c5b4e3994a956f92
Thanks,
Harald
> Thanks.
>
next prev parent reply other threads:[~2022-10-17 17:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 19:45 [PATCH] Fortran: simplify array constructors with typespec [PR93483, " Harald Anlauf
2022-10-15 20:15 ` [PATCH, v2] Fortran: handle bad array ctors with typespec [PR93483,, " Harald Anlauf
2022-10-16 21:17 ` [PATCH, v2] Fortran: handle bad array ctors with typespec [PR93483, , " Mikael Morin
2022-10-17 17:31 ` Harald Anlauf [this message]
2022-10-17 17:31 ` Harald Anlauf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f4bf6364-6829-4641-c4df-5ea638932e6d@gmx.de \
--to=anlauf@gmx.de \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).