I'm getting a segmentation fault with the latest ifx (2024.0) and ifort (2021.11.10). The attached example is a bit big, but it demonstrates the problem. The code works fine with gfortran and NAG Fortran.
To extract, build and run
$ tar zxvf bug_derived_type_20231202_v4.tar.gz
$ cd bug_derived_type
The segmentation fault happens on exit from the switch routine (line 511). Removing the antenna component on line 659 stops the segmentation fault from happening. Replacing the HSEarthTerminal and HSEarthTerminalVector with HSSurfaceAsset and HSSurfaceAssetVector in the main program also stops the segmentation fault from happening.
(The program reads a dataset from a text file, which is included, and attempts to sort the resulting vector object.)
I have tested this and I also see the segfault. I used the 2024.0 compiler and our development branch - both show the bug.
This reproducer is perfect - a single file. it's not too big, we can work with this. I will isolate this down more and get a bug report on it. Thank you for a very good reproducer!