Bug 37205 - BIND(C): Character FUNCTION foo() -> ICE
Summary: BIND(C): Character FUNCTION foo() -> ICE
Status: RESOLVED DUPLICATE of bug 37201
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2008-08-22 21:22 UTC by Tobias Burnus
Modified: 2008-08-23 19:13 UTC (History)
2 users (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 2008-08-22 21:22:51 UTC
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/c1d51d45d8779b90

Internal Compiler Error: in gfc_conv_string_parameter, at fortran/trans-expr.c:4009

--C program ----------------------
char cdir(void){return '/';}

--Fortran program ----------------
MODULE mod
  INTERFACE
    FUNCTION cdir() BIND(C,name="cdir") RESULT(r)
      USE iso_c_binding
      CHARACTER(kind=C_CHAR) :: r
    END FUNCTION
  END INTERFACE
END MODULE

PROGRAM test
  USE mod
  WRITE(*,*) cdir()
  WRITE(*,*) ICHAR(cdir())
END PROGRAM
Comment 1 Tobias Burnus 2008-08-23 19:13:56 UTC
Actually, this PR was first ...

*** This bug has been marked as a duplicate of 37201 ***