This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36076] New: Pointer intent(IN): Mark as const pointer
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Apr 2008 06:09:13 -0000
- Subject: [Bug fortran/36076] New: Pointer intent(IN): Mark as const pointer
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Unless I'm mistaken, we never mark dummy pointers as "const" for the middle
end.
For
subroutine sub(a)
integer, pointer, intent(in) :: a
the C code would be "void sub(const int *a)". I think we miss the "const" in
the when creating the GIMPLE. In principle this "const" should also be applied
to other arguments which are have not the POINTER argument. (However, we need
to be careful as the front end might generate pointer assignments itself.)
--
Summary: Pointer intent(IN): Mark as const pointer
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36076