public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/32140] [4.3 Regression] Miscompilation with -O1 Date: Sun, 17 Jun 2007 22:08:00 -0000 [thread overview] Message-ID: <20070617220817.24046.qmail@sourceware.org> (raw) In-Reply-To: <bug-32140-6642@http.gcc.gnu.org/bugzilla/> ------- Comment #17 from pinskia at gcc dot gnu dot org 2007-06-17 22:08 ------- Here is the fix which I am testing, basically instead of creating (typeof(array[0] "*")&array we create &array[lb]: Index: trans.c =================================================================== --- trans.c (revision 125777) +++ trans.c (working copy) @@ -266,7 +266,14 @@ gfc_build_addr_expr (tree type, tree t) && TREE_CODE (base_type) == ARRAY_TYPE && TYPE_MAIN_VARIANT (TREE_TYPE (type)) == TYPE_MAIN_VARIANT (TREE_TYPE (base_type))) - natural_type = type; + { + tree min_val = size_zero_node; + tree type_domain = TYPE_DOMAIN (base_type); + if (type_domain && TYPE_MIN_VALUE (type_domain)) + min_val = TYPE_MIN_VALUE (type_domain); + t = build4 (ARRAY_REF, TREE_TYPE (type), t, min_val, NULL_TREE, NULL_TREE); + natural_type = type; + } else natural_type = build_pointer_type (base_type); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32140
next prev parent reply other threads:[~2007-06-17 22:08 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-05-29 15:03 [Bug fortran/32140] New: wrong code jv244 at cam dot ac dot uk 2007-05-29 15:32 ` [Bug fortran/32140] [4.3 Regression] Miscompilation with -O1 burnus at gcc dot gnu dot org 2007-05-29 15:41 ` jv244 at cam dot ac dot uk 2007-05-29 18:09 ` [Bug middle-end/32140] " burnus at gcc dot gnu dot org 2007-05-29 18:15 ` burnus at gcc dot gnu dot org 2007-05-29 18:26 ` pinskia at gcc dot gnu dot org 2007-05-30 9:23 ` jv244 at cam dot ac dot uk 2007-06-03 9:02 ` jv244 at cam dot ac dot uk 2007-06-12 15:47 ` [Bug fortran/32140] " fxcoudert at gcc dot gnu dot org 2007-06-13 0:55 ` jvdelisle at gcc dot gnu dot org 2007-06-15 14:43 ` jv244 at cam dot ac dot uk 2007-06-15 15:12 ` fxcoudert at gcc dot gnu dot org 2007-06-15 15:22 ` pinskia at gmail dot com 2007-06-16 19:04 ` jv244 at cam dot ac dot uk 2007-06-17 17:54 ` pault at gcc dot gnu dot org 2007-06-17 21:40 ` [Bug middle-end/32140] " pinskia at gcc dot gnu dot org 2007-06-17 21:45 ` [Bug fortran/32140] " pinskia at gcc dot gnu dot org 2007-06-17 22:08 ` pinskia at gcc dot gnu dot org [this message] 2007-06-18 1:49 ` jvdelisle at gcc dot gnu dot org 2007-06-20 8:48 ` jv244 at cam dot ac dot uk 2007-06-20 8:52 ` fxcoudert at gcc dot gnu dot org 2007-06-20 13:22 ` pinskia at gmail dot com 2007-06-20 13:53 ` rguenth at gcc dot gnu dot org 2007-06-20 13:55 ` rguenth at gcc dot gnu dot org 2007-06-20 14:03 ` jv244 at cam dot ac dot uk 2007-06-20 14:03 ` pinskia at gcc dot gnu dot org 2007-06-20 14:05 ` pinskia at gcc dot gnu dot org 2007-06-20 14:08 ` rguenther at suse dot de 2007-06-20 14:57 ` rguenth at gcc dot gnu dot org 2007-06-20 14:59 ` rguenth 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=20070617220817.24046.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).