https://gcc.gnu.org/bugzilla/show_bug.cgi?id=44925
janus at gcc dot gnu.org changed:
What|Removed |Added
Target Milestone|--- |4.6.0
--- Comment #10 from janus at gcc dot gnu dot org 2010-07-14 08:15 ---
Fixed with r162169. Closing.
--
janus at gcc dot gnu dot org changed:
What|Removed |Added
--- Comment #9 from janus at gcc dot gnu dot org 2010-07-14 08:09 ---
Subject: Bug 44925
Author: janus
Date: Wed Jul 14 08:09:05 2010
New Revision: 162169
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162169
Log:
2010-07-14 Janus Weil
PR fortran/44925
* gfor
--- Comment #8 from burnus at gcc dot gnu dot org 2010-07-13 15:54 ---
(In reply to comment #5)
> Here int_ptr is a pointer to an array of integers, but int_ptr(0) is an
> element
> of that array, so it doesn't have the POINTER attribute, does it?
It doesn't have the pointer attribute
--- Comment #7 from janus at gcc dot gnu dot org 2010-07-13 13:54 ---
Ok, here goes the next try. This patch cures the bogus error from comment #0,
removes the regressions on c_loc_tests_* and rejects the test case due to the
polymorphic argument:
Index: gcc/fortran/resolve.c
==
--- Comment #6 from janus at gcc dot gnu dot org 2010-07-13 12:32 ---
> c_loc_tests_5.f03 has:
>
> integer(c_int), dimension(:), pointer :: int_ptr
> my_c_ptr = c_loc(int_ptr(0))
>
> Here int_ptr is a pointer to an array of integers, but int_ptr(0) is an
> element
> of that a
--- Comment #5 from janus at gcc dot gnu dot org 2010-07-13 12:12 ---
(In reply to comment #3)
> For the program in comment 0, NAG prints:
> Error: aaa.f90, line 16: The argument to C_LOC must not be polymorphic
> though ifort and crayftn accept the code. Thus, at least with
> -std=f95
--- Comment #4 from burnus at gcc dot gnu dot org 2010-07-13 12:04 ---
Thus: The derived type needs to be BIND(C) - but then it cannot be extended (as
it is not extensible) - nor can the extended type be BIND(C) (per C1503). And
without BIND(C) it is not interoperable - besides that poly
--- Comment #3 from burnus at gcc dot gnu dot org 2010-07-13 11:52 ---
For the program in comment 0, NAG prints:
Error: aaa.f90, line 16: The argument to C_LOC must not be polymorphic
though ifort and crayftn accept the code. Thus, at least with
-std=f95/f2003/f2008 one should reject i
--- Comment #2 from janus at gcc dot gnu dot org 2010-07-13 11:10 ---
(In reply to comment #1)
> However, it regresses at least on c_loc_tests_5.f03 and c_loc_tests_14.f90.
Actually I have the feeling that both of these test cases are invalid, and the
patch is right to reject them.
--
--- Comment #1 from janus at gcc dot gnu dot org 2010-07-13 09:45 ---
The following patch fixes the PR:
Index: gcc/fortran/dependency.c
===
--- gcc/fortran/dependency.c(revision 162124)
+++ gcc/fortran/dependency.c(
--
janus at gcc dot gnu dot org changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywor
12 matches
Mail list logo