- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am having trouble with inlining when using a mixed C and Fortran 2008 code. The optimization report states:
-> (25,9) testfun(int64_t *, const int64_t, double *) (isz = 18) (sz = 27)
[[ Unable to inline callsite <1>]]
-> (27,9) testfunptr(int64_t *, const int64_t, double *) (isz = 18) (sz = 27)
[[ Unable to inline callsite <1>]]
<1> Inlining the subprogram will lead to incorrect program behavior.
Why does the compiler state that inlining will lead to incorrect behavior?
The C functions have the following signatures:
void testfun( int64_t *a, const int64_t b, double *c ); void testfunptr( int64_t *a, const int64_t b, double *c );
The Fortran code provides explicit interfaces to these functions:
interface subroutine testfun( a, b, c ) bind( C, name = 'testfun' ) use, intrinsic :: iso_c_binding, only: c_int64_t, c_double implicit none integer( kind = c_int64_t ), dimension( * ), intent( inout ) :: a integer( kind = c_int64_t ), value, intent( in ) :: b real( kind = c_double ), dimension( * ), intent( inout ) :: c end subroutine testfun subroutine testfunptr( a, b, c ) bind( C, name = 'testfunptr' ) use, intrinsic :: iso_c_binding, only: c_int64_t, c_ptr implicit none type( c_ptr ), value :: a integer( kind = c_int64_t ), value, intent( in ) :: b type( c_ptr ), value :: c end subroutine testfunptr end interface
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had a similar issue. I opened a support ticket (02522591) which was closed without explanation.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page