- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following use of MERGE inside an overloaded structure constructor results in an internal compiler error.
MODULE Direct2D IMPLICIT NONE PRIVATE TYPE, BIND(C), PUBLIC :: D2D1_POINT_2F REAL :: x = 0.0 REAL :: y = 0.0 END TYPE D2D1_POINT_2F TYPE, BIND(C), PUBLIC :: D2D1_RECT_F REAL :: left = 0.0 REAL :: top = 0.0 REAL :: right = 0.0 REAL :: bottom = 0.0 END TYPE D2D1_RECT_F INTERFACE D2D1_RECT_F MODULE PROCEDURE D2D1_RECT_F_constructor_point_point END INTERFACE D2D1_RECT_F PUBLIC :: FillRectangle CONTAINS FUNCTION D2D1_RECT_F_constructor_point_point(top_left, bottom_right) & RESULT(rect) TYPE(D2D1_POINT_2F), INTENT(IN) :: top_left TYPE(D2D1_POINT_2F), INTENT(IN) :: bottom_right TYPE(D2D1_RECT_F) :: rect rect%left = 0.0 END FUNCTION D2D1_RECT_F_constructor_point_point SUBROUTINE FillRectangle(rect) TYPE(D2D1_RECT_F), INTENT(IN) :: rect END SUBROUTINE FillRectangle END MODULE Direct2D SUBROUTINE draw_swatch USE Direct2D IMPLICIT NONE CALL FillRectangle( & D2D1_RECT_F( & 1.0, & 1.0 - 5.0, & 1.0 + MERGE(38.0, -5.0, .TRUE.), & 1.0 + 5.0 ) ) END SUBROUTINE draw_swatch
>ifort /c "2016-05-04 ice.f90" Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 16.0.2.180 Build 20160204 Copyright (C) 1985-2016 Intel Corporation. All rights reserved. 2016-05-04 ice.f90(38): internal error: Please visit 'http://www.intel.com/software/products/support' for assistance. CALL FillRectangle( & ^ [ Aborting due to internal error. ] compilation aborted for 2016-05-04 ice.f90 (code 1)
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for reporting this error Ian and for the convenient reproducer. I confirmed this defect in both our current 16.0 and upcoming 17.0 compilers and reported it to Development.
(Internal tracking id: DPD200410562)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This issue is fixed in the next major release (18.0) scheduled for release later this year.
![](/skins/images/B7BA37F9CE4B52FF7CAE1FB0388839C8/responsive_peak/images/icon_anonymous_message.png)
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