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

Strange dependence on a stack size

Deleted_U_Intel
Employee
371 Views
Here I attach the small test program which reproduce bug (or not bug??)
Draft explanation:
When I allocate dynamic array MAT(NN,NN) I can do, for example, "MAT=MAT*1.3" with array of any size.

When array is the field in the structure, operation "STRUC%MAT=STRUC%MAT*1.3" give me segfault if array size larger than stacksize.

That's strange behavior I've got on IA32.

I've checked on IA64 with EFC and didn't find such effect. Array size might be much larger than stack size and it works normaly.

Also it works normaly with LF95 in IA32, and SGI and SUN compilers on MIPS and SPARC.
So, I guess it shouldn't be such behavior.

To avoid any possible optimization effects I compiled example even with:
ifort -o test -O0 test.f90

Should I add some more options to avoid it? Or it is just a bag?
0 Kudos
1 Reply
Steven_L_Intel1
Employee
371 Views
It's not a bug, but it is a missed optimization opportunity, and one we are already looking at.
0 Kudos
Reply