This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/43665] INTENT(IN) etc. optimization of calls: function annotations for noclobber/noescape arguments



------- Comment #7 from burnus at gcc dot gnu dot org  2010-07-20 15:06 -------
Created an attachment (id=21265)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21265&action=view)
Draft patch for external/user procs with INTENT (mostly OK, but breaks existing
test)

The attached patch mostly works, except for
gfortran.dg/allocatable_scalar_4.f90.

The latter file works fine with -O1 but with -O2 it crashes. At -O1 with
-fdump-tree-original, essentially only one "if" is optimized away:

  b = 7482
  call checkOptional(.false.,.true., 7482)
  if (b /= 7482) call abort() ! <<<< This line is removed for -O1
  call checkOptional(.true., .true., 7482, b)

I could not see anything suspicious for -O{2,1} -fdump-tree-optimized; one
should check -fdump-tree-optimized-all. I somehow have the feeling that some
other DECL is wrong. Cf. PR 44945 for another manifestation of DECL problems
(though there for derived types).

Note: Using -fwhole-file does not help.


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]