Bug 33412 - Bind(C): ELEMENTAL procedure conflicts with BIND(C)
Summary: Bind(C): ELEMENTAL procedure conflicts with BIND(C)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: accepts-invalid
Depends on:
Blocks:
 
Reported: 2007-09-12 20:17 UTC by Tobias Burnus
Modified: 2007-09-13 17:59 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2007-09-12 20:17:17 UTC
C1242 (R1227) A prefix shall not specify ELEMENTAL if proc-language-binding-spec appears in the function-stmt or subroutine-stmt.

NAG f95:
Error: z.f90, line 1: BIND(C) is not allowed for elemental procedure A


Example:

elemental function a(b) bind(c)
  use iso_c_binding
  real(c_float) :: a, b
  intent(in) :: b
  a = b
end function a
Comment 1 patchapp@dberlin.org 2007-09-13 05:10:36 UTC
Subject: Bug number PR 33412

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2007-09/msg01122.html
Comment 2 Tobias Burnus 2007-09-13 17:58:27 UTC
Subject: Bug 33412

Author: burnus
Date: Thu Sep 13 17:58:10 2007
New Revision: 128471

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128471
Log:
2007-09-13  Tobias Burnus  <burnus@net-b.de>

	PR fortran/33412
	* symbol.c (check_conflict): Add conflict of ELEMENTAL with Bind(C).

2007-09-13  Tobias Burnus  <burnus@net-b.de>

	PR fortran/33412
	* gfortran.dg/elemental_bind_c.f90: New.


Added:
    trunk/gcc/testsuite/gfortran.dg/elemental_bind_c.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/symbol.c
    trunk/gcc/testsuite/ChangeLog

Comment 3 Tobias Burnus 2007-09-13 17:59:22 UTC
FIXED on the trunk (4.3.0).