public inbox for
 help / color / mirror / Atom feed
From: Mikael Morin <>
To: Harald Anlauf <>,
Subject: Re: [PATCH, v2] Fortran: handle bad array ctors with typespec [PR93483, , PR107216, PR107219]
Date: Sun, 16 Oct 2022 23:17:08 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <tif4d7$rg7$>

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.  */
> -/* 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 

OK with that comment fixed.


  parent reply	other threads:[~2022-10-16 21:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-12 19:45 [PATCH] Fortran: simplify array constructors with typespec [PR93483, " Harald Anlauf
     [not found] ` <tif4d7$rg7$>
2022-10-16 21:17   ` Mikael Morin [this message]
2022-10-17 17:31     ` [PATCH, v2] Fortran: handle bad array ctors with typespec [PR93483, , " 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* 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).