This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/25558] Arguments cannot alias local variables
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Dec 2005 05:30:22 -0000
- Subject: [Bug tree-optimization/25558] Arguments cannot alias local variables
- References: <bug-25558-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from pinskia at gcc dot gnu dot org 2005-12-25 05:30 -------
(In reply to comment #4)
> (In reply to comment #3)
> > What is interesting is that ICC does not even do this optimization.
>
> Even LLVM does this optimization, I am starting to think ICC is not really a
> good compiler.
Ifort actually does this optimization, it is just weird that. Here is the
equivalent Fortran code:
module f1
contains
function g(a)
integer g
integer a
g = 1
a = 2
end function
function f(a)
real f
integer a
integer b
integer c
b=1
c = g(b)
b = 1
a = 2
if (b .ne. 1) then
call link_error ()
end if
f = 1
end function
end module
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25558