public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/55978] [4.8 Regression] class_optional_2.f90 -Os fails
Date: Wed, 06 Feb 2013 11:17:00 -0000 [thread overview]
Message-ID: <bug-55978-4-qhZo6QdZg4@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-55978-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55978
--- Comment #17 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-02-06 11:16:38 UTC ---
(In reply to comment #16)
> For the allocatable case, no packing is done at all (I guess it's just not
> needed there, since an allocatable array, contrary to a pointer, is always
> contiguous, right?).
Good point. Also simply contiguous pointers shouldn't need packing, though, I
think that is checked before - hence, this code only reaches
non-simply-contiguous arrays.
Additionally, I think we currently add the wrong checks for (sym = DT with
pointer, optional attribute; fsym = optional):
7159 if (fsym && fsym->attr.optional && sym && sym->attr.optional)
7160 {
7161 tmp = gfc_conv_expr_present (sym);
When one uses"sym%comp" as actual argument. In that case "sym" has to be
present and a non-null pointer. Thus, if "comp" is a pointer, only "sym%comp ==
NULL" needs to be checked, if "comp" isn't a pointer, no check at all is
required.
Maybe one should rename "gfc_conv_expr_present" to "gfc_conv_sym_present" - and
add a version for expressions, which can then be called for:
if (fsym && fsym->attr.optional
&& (sym && sym->attr.optional)
|| expr->expr_type == EXPR_NULL
|| (expr->ts.type != BT_CLASS gfc_expr_attr(expr).pointer)
|| (expr->ts.type == BT_CLASS gfc_expr_attr(expr).class_pointer)))
{
tmp = gfc_conv_expr_present (sym);
next prev parent reply other threads:[~2013-02-06 11:17 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-14 20:56 [Bug fortran/55978] New: " tkoenig at gcc dot gnu.org
2013-01-14 21:30 ` [Bug fortran/55978] " tkoenig at gcc dot gnu.org
2013-01-14 22:33 ` dominiq at lps dot ens.fr
2013-01-14 23:03 ` tkoenig at gcc dot gnu.org
2013-01-15 9:55 ` rguenth at gcc dot gnu.org
2013-01-15 11:27 ` burnus at gcc dot gnu.org
2013-01-15 11:27 ` burnus at gcc dot gnu.org
2013-01-15 11:36 ` burnus at gcc dot gnu.org
2013-01-15 14:48 ` burnus at gcc dot gnu.org
2013-01-19 7:40 ` hp at gcc dot gnu.org
2013-01-25 17:44 ` dominiq at lps dot ens.fr
2013-02-04 13:11 ` ro at gcc dot gnu.org
2013-02-04 13:45 ` jakub at gcc dot gnu.org
2013-02-05 21:26 ` janus at gcc dot gnu.org
2013-02-05 22:27 ` janus at gcc dot gnu.org
2013-02-05 22:31 ` janus at gcc dot gnu.org
2013-02-05 22:46 ` burnus at gcc dot gnu.org
2013-02-06 10:55 ` janus at gcc dot gnu.org
2013-02-06 11:17 ` burnus at gcc dot gnu.org [this message]
2013-02-06 11:45 ` janus at gcc dot gnu.org
2013-02-06 12:17 ` burnus at gcc dot gnu.org
2013-02-06 12:55 ` janus at gcc dot gnu.org
2013-02-06 13:01 ` janus at gcc dot gnu.org
2013-02-06 13:56 ` janus at gcc dot gnu.org
2013-02-06 19:41 ` janus at gcc dot gnu.org
2013-02-06 19:51 ` [Bug fortran/55978] " janus at gcc dot gnu.org
2013-03-22 14:45 ` jakub at gcc dot gnu.org
2013-05-31 10:59 ` jakub at gcc dot gnu.org
2013-10-16 9:49 ` jakub at gcc dot gnu.org
2015-06-22 14:25 ` rguenth at gcc dot gnu.org
2023-12-16 21:45 ` anlauf at gcc dot gnu.org
2023-12-16 21:47 ` anlauf at gcc dot gnu.org
2024-03-22 21:02 ` cvs-commit at gcc dot gnu.org
2024-03-23 20:13 ` cvs-commit at gcc dot gnu.org
2024-06-22 17:35 ` anlauf at gcc dot gnu.org
2024-06-24 17:25 ` cvs-commit at gcc dot gnu.org
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=bug-55978-4-qhZo6QdZg4@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@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).