public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "matz at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/40194] fortran rules for optimizing
Date: Thu, 13 Aug 2009 12:16:00 -0000	[thread overview]
Message-ID: <20090813121617.4421.qmail@sourceware.org> (raw)
In-Reply-To: <bug-40194-6642@http.gcc.gnu.org/bugzilla/>



------- Comment #9 from matz at gcc dot gnu dot org  2009-08-13 12:16 -------
It is indeed somewhat related, but currently the patchset doesn't help here.
The first issue is, that I create new types with unconflicting alias sets
only for global variables, not local ones (as I1 is in this case).  I believe
I can change this meanwhile (the restriction came from earlier versions of
the patch).  But even if this is fixed we can't figure out the difference
between INTENT(IN) and INTENT(OUT), i.e. even then we still believe that 
I1 can possibly be changed by the call.

We have three ways out of this:
1) make the frontend not pass INTENT(IN) parameters by reference, maybe
   at least for scalars.  That would be the preferred way, but unfortunately
   this probably would break a lot of code assuming such calling convention
   especially when interfacing with C code :-/
2) invent a new attribute that we can attach to the individual arguments
   that would indicate non-clobbering via this reference
3) find a combination of existing things (DECL_BY_REFERENCE/TREE_READONLY/etc)
   that could be used by the middle end to conclude non-clobbering.
   Something like a const reference comes to mind, but unfortunately (the
   middle-end coming mostly from the C/C++ side) we don't conclude many
   interesting things about const refs/pointers.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40194


  parent reply	other threads:[~2009-08-13 12:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-19  9:59 [Bug middle-end/40194] New: " jv244 at cam dot ac dot uk
2009-05-19 10:01 ` [Bug middle-end/40194] " jv244 at cam dot ac dot uk
2009-05-19 10:14 ` jv244 at cam dot ac dot uk
2009-05-19 10:20 ` rguenth at gcc dot gnu dot org
2009-05-19 10:40 ` rguenth at gcc dot gnu dot org
2009-05-19 11:55 ` jv244 at cam dot ac dot uk
2009-05-19 12:04 ` rguenth at gcc dot gnu dot org
2009-05-19 12:11 ` rguenth at gcc dot gnu dot org
2009-08-13  7:23 ` jv244 at cam dot ac dot uk
2009-08-13 12:16 ` matz at gcc dot gnu dot org [this message]
     [not found] <bug-40194-4@http.gcc.gnu.org/bugzilla/>
2012-06-29 14:14 ` Joost.VandeVondele at mat dot ethz.ch
2013-03-29  9:07 ` Joost.VandeVondele at mat dot ethz.ch

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=20090813121617.4421.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: 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).