Skip to content

Error: Division by zero in testfp1.f90 #5

@victorsndvg

Description

@victorsndvg

If we compile FortranParser with intel compilers in debug mode we get Error: Division by zero in testfp1.f90:

$ bin/testfp1 
 ==> Bytecode evaluation:
 a0*b0 =   2.00000000000000     
 *** Error: Division by zero                
 a1/b1 =  0.000000000000000E+000
 a3**b3=   15625.0000000000     
 ==> Direct evaluation:
 res=   2.00000000000000     
forrtl: error (73): floating divide by zero
Image              PC                Routine            Line        Source             
testfp1            0000000000430F74  Unknown               Unknown  Unknown
libpthread-2.23.s  00007FF3E1106390  Unknown               Unknown  Unknown
testfp1            0000000000405172  MAIN__                     43  testfp1.f90
testfp1            00000000004042F2  Unknown               Unknown  Unknown
libc-2.23.so       00007FF3E0B47830  __libc_start_main     Unknown  Unknown
testfp1            00000000004041E9  Unknown               Unknown  Unknown
Aborted (core dumped)

Simply replacing the zero in this line solves the issue:
https://github.com/jacopo-chevallard/FortranParser/blob/master/src/tests/testfp1.f90#L22

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions