From: FX <fxcoudert@gmail.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org
Subject: Re: [PATCH] fortran: Expand ieee_arithmetic module's ieee_value inline [PR106579]
Date: Mon, 15 Aug 2022 22:00:02 +0200 [thread overview]
Message-ID: <4B7DE3A3-8F13-49D1-BCA9-723360EC386A@gmail.com> (raw)
In-Reply-To: <Yvod/YsTujqYkGMU@tucnak>
Hi Jakub,
I have two questions, on this and the ieee_class patch:
> + tree type = TREE_TYPE (arg);
> + gcc_assert (TREE_CODE (type) == RECORD_TYPE);
> + tree field = NULL_TREE;
> + for (tree f = TYPE_FIELDS (type); f != NULL_TREE; f = DECL_CHAIN (f))
> + if (TREE_CODE (f) == FIELD_DECL)
> + {
> + gcc_assert (field == NULL_TREE);
> + field = f;
> + }
> + gcc_assert (field);
Why looping over fields? The class type is a simple type with only one member (and it should be an integer, we can assert that).
> + case IEEE_POSITIVE_ZERO:
> + /* Make this also the default: label. */
> + label = gfc_build_label_decl (NULL_TREE);
> + tmp = build_case_label (NULL_TREE, NULL_TREE, label);
> + gfc_add_expr_to_block (&body, tmp);
> + real_from_integer (&real, TYPE_MODE (type), 0, SIGNED);
> + break;
Do we need a default label? It’s not like this is a more likely case than anything else…
Thanks,
FX
next prev parent reply other threads:[~2022-08-15 20:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-15 10:20 Jakub Jelinek
2022-08-15 20:00 ` FX [this message]
2022-08-15 20:21 ` Jakub Jelinek
2022-08-16 12:58 ` FX
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=4B7DE3A3-8F13-49D1-BCA9-723360EC386A@gmail.com \
--to=fxcoudert@gmail.com \
--cc=fortran@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
/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).