public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "janus 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: Tue, 05 Feb 2013 22:31:00 -0000 [thread overview] Message-ID: <bug-55978-4-6CufyoY6dY@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 #14 from janus at gcc dot gnu.org 2013-02-05 22:31:06 UTC --- Draft patch: Index: gcc/fortran/trans-array.c =================================================================== --- gcc/fortran/trans-array.c (revision 195644) +++ gcc/fortran/trans-array.c (working copy) @@ -7164,6 +7164,17 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * fold_convert (TREE_TYPE (se->expr), null_pointer_node)); } + if (fsym && fsym->attr.optional && sym && sym->attr.pointer) + { + tmp = build_fold_indirect_ref_loc (input_location, desc); + tmp = gfc_conv_array_data (tmp); + tmp = fold_build2_loc (input_location, NE_EXPR, boolean_type_node, + tmp, fold_convert (TREE_TYPE (tmp), null_pointer_node)); + ptr = build3_loc (input_location, COND_EXPR, TREE_TYPE (se->expr), + tmp, fold_convert (TREE_TYPE (se->expr), ptr), + fold_convert (TREE_TYPE (se->expr), null_pointer_node)); + } + ptr = gfc_evaluate_now (ptr, &se->pre); /* Use the packed data for the actual argument, except for contiguous arrays,
next prev parent reply other threads:[~2013-02-05 22:31 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 [this message] 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 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-6CufyoY6dY@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: linkBe 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).