Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29280 Discussions

Using qsort and the nus option together

s_m_rispens
Beginner
493 Views
I was using a combination of C and Fortran routines, so I use the compiler option -nus. Now when I combined this with theroutine qsort, I got the error:
forrtl: severe (174): SIGSEGV, segmentation fault occurred
This can be solved by calling qsort_(...,...,...,...). I.e. adding the underscore yourself.
I guess the compiler has two different variants of qsort available, and with the -nus option it takes the one for C, and without it it takes the one for Fortran?
Sietse
0 Kudos
1 Reply
Steven_L_Intel1
Employee
493 Views
I think that without the underscore, you are getting one from the C library which expects C calling conventions. That's the risk you take when you tell the compiler to change the default naming conventions.
0 Kudos
Reply