This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/70279] New: Crash duing compilation with NINT and 128 bits integer


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70279

            Bug ID: 70279
           Summary: Crash duing compilation with NINT and 128 bits integer
           Product: gcc
           Version: 4.8.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: francois.willot at ensmp dot fr
  Target Milestone: ---

Compiling the code below makes gfortran 4.8.4 crash:

gfortran -Wall -O3 -pedantic-errors -pedantic -Werror -std=f2003 -fopenmp -cpp
-DMULTITHREADS test.f90

test.f90: In function âMAIN__â:
test.f90:17:0: internal compiler error: in build_round_expr, at
fortran/trans-intrinsic.c:394
 PRINT *,NINT(a,i)
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions.

The code is:

PROGRAM MAIN
IMPLICIT NONE
INTEGER, PARAMETER :: i=SELECTED_INT_KIND(30)
DOUBLE PRECISION :: a
a=0.0D0
PRINT *,NINT(a,i)
END


Instead, this code runs as expected

PROGRAM MAIN
IMPLICIT NONE
INTEGER, PARAMETER :: i=SELECTED_INT_KIND(30)
PRINT *,NINT(0.0D0,i),i
END

(It produces:
 0     16      
)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]