public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dominiq at lps dot ens dot fr" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/44235] array temporary with high upper bound Date: Fri, 06 Aug 2010 22:49:00 -0000 [thread overview] Message-ID: <20100806224900.15138.qmail@sourceware.org> (raw) In-Reply-To: <bug-44235-10391@http.gcc.gnu.org/bugzilla/> ------- Comment #5 from dominiq at lps dot ens dot fr 2010-08-06 22:49 ------- Note that the following patch I have in my tree for some time now also fix the pr --- gcc/fortran/dependency.c 2010-08-07 00:37:34.000000000 +0200 +++ ../work/gcc/fortran/dependency.c 2010-08-05 19:11:58.000000000 +0200 @@ -1172,8 +1172,8 @@ check_section_vs_section (gfc_array_ref /* Check for forward dependencies x:y vs. x+1:z. */ if (l_dir == 1 && r_dir == 1 - && l_start && r_start && gfc_dep_compare_expr (l_start, r_start) == -1 - && l_end && r_end && gfc_dep_compare_expr (l_end, r_end) == -1) + && ((l_start && r_start && gfc_dep_compare_expr (l_start, r_start) == -1) + || (l_end && r_end && gfc_dep_compare_expr (l_end, r_end) == -1))) { /* Check that the strides are the same. */ if (!l_stride && !r_stride) @@ -1185,8 +1185,8 @@ check_section_vs_section (gfc_array_ref /* Check for forward dependencies x:y:-1 vs. x-1:z:-1. */ if (l_dir == -1 && r_dir == -1 - && l_start && r_start && gfc_dep_compare_expr (l_start, r_start) == 1 - && l_end && r_end && gfc_dep_compare_expr (l_end, r_end) == 1) + && ((l_start && r_start && gfc_dep_compare_expr (l_start, r_start) == 1) + || (l_end && r_end && gfc_dep_compare_expr (l_end, r_end) == 1))) { /* Check that the strides are the same. */ if (!l_stride && !r_stride) This followed a discussion with Tobias Burnus on IRC. It assumes that the code is valid, i.e., lhs and rhs has the same extent, otherwise creating a temporary does make the code valid, even if the result is not the same with or without temporary. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44235
next prev parent reply other threads:[~2010-08-06 22:49 UTC|newest] Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-05-21 21:46 [Bug fortran/44235] New: " tkoenig at gcc dot gnu dot org 2010-05-22 8:20 ` [Bug fortran/44235] " tkoenig at gcc dot gnu dot org 2010-06-04 22:40 ` tkoenig at gcc dot gnu dot org 2010-07-01 20:23 ` dominiq at lps dot ens dot fr 2010-08-06 21:24 ` steven at gcc dot gnu dot org 2010-08-06 21:34 ` dominiq at lps dot ens dot fr 2010-08-06 22:49 ` dominiq at lps dot ens dot fr [this message] 2010-08-07 9:01 ` dominiq at lps dot ens dot fr 2010-08-07 11:17 ` tkoenig at gcc dot gnu dot org 2010-08-07 13:40 ` dominiq at lps dot ens dot fr 2010-08-08 16:08 ` tkoenig at gcc dot gnu dot org 2010-08-08 20:09 ` dominiq at lps dot ens dot fr 2010-08-08 22:41 ` tkoenig at gcc dot gnu dot org 2010-08-09 19:35 ` tkoenig at gcc dot gnu dot org 2010-08-27 12:12 ` tkoenig at gcc dot gnu dot 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=20100806224900.15138.qmail@sourceware.org \ --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).