Showing results for 
Search instead for 
Did you mean: 

Seg fault on optional pointer argument

Using a pointer to an integer array as an optional argument cause a segmentation fault (ifort Build 20180410, CentOS 7.5).

See attached code for an example.

$> ifort -c opt_args.f90 
$> ifort -o test_opt_args test_opt_args.f90 opt_args.o
$> ./test_opt_args 
 get_vals(x, y, p)
   x:            1
   y:            2
   p:            1           2           3           4
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source             
test_opt_args      000000000040405D  Unknown               Unknown  Unknown
libpthread-2.17.s  00007FA2832F76D0  Unknown               Unknown  Unknown
test_opt_args      0000000000403196  Unknown               Unknown  Unknown
test_opt_args      0000000000402E85  Unknown               Unknown  Unknown
test_opt_args      0000000000402B1E  Unknown               Unknown  Unknown       00007FA282F3D445  __libc_start_main     Unknown  Unknown
test_opt_args      0000000000402A29  Unknown               Unknown  Unknown


0 Kudos
3 Replies
Valued Contributor I

Confirmed, this works with

Confirmed, this works with gfortran 5 and 9, and with nagfor 6.2 and pgfortran 18.5. And it works with ifort v17, so this is a regression in v18 and v19beta. Could you submit a bug report via the support center?

0 Kudos

I cannot submit a ticket even

I cannot submit a ticket even though I have a valid license. There must be something wrong with my account.

Can you submit it for me?

0 Kudos
Valued Contributor I

I would but off for summer

I would but off for summer vacation now. Not in front of a computer. Maybe the Intel stuff picks it up...

0 Kudos