[flang] Fix SELECT TYPE lowering when CLASS DEFAULT is not the last type guard
CLASS DEFAULT needs to be the last attribute when fir.select_type op is created. It needs to be at its actual position in the Fortran code when the TypeGuardStmt are processed. The current lowering was crashing when CLASS DEFAULT was not at the last position. This patch fixes the issue by tracking the actual position of the CLASS DEFAULT type guard and set it at the correct position after the fir.select_type op is created. Reviewed By: jeanPerier, PeteSteinfeld Differential Revision: https://reviews.llvm.org/D142091
Loading
Please sign in to comment