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 fortran/33271] New: nint_2.f90 abort compiled with -O0


This is at the specific request of Mr. Coudert.

Testsuite output:

Executing on host: /var/tmp/43/build-159/gcc/testsuite/gfortran/../../gfortran
-B/var/tmp/43/build-159/gcc/testsuite/gfortran/../../
/var/tmp/43/gcc-4.3.0/gcc/testsuite/gfortran.dg/nint_2.f90   -O0  
-pedantic-errors 
-L/var/tmp/43/build-159/powerpc-unknown-linux-gnu/./libgfortran/.libs
-L/var/tmp/43/build-159/powerpc-unknown-linux-gnu/./libgfortran/.libs
-L/var/tmp/43/build-159/powerpc-unknown-linux-gnu/./libiberty  -lm   -o
./nint_2.exe    (timeout = 300)
PASS: gfortran.dg/nint_2.f90  -O0  (test for excess errors)
Setting LD_LIBRARY_PATH to
.:/var/tmp/43/build-159/powerpc-unknown-linux-gnu/./libgfortran/.libs:/var/tmp/43/build-159/powerpc-unknown-linux-gnu/./libgfortran/.libs:/var/tmp/43/build-159/gcc:.:/var/tmp/43/build-159/powerpc-unknown-linux-gnu/./libgfortran/.libs:/var/tmp/43/build-159/powerpc-unknown-linux-gnu/./libgfortran/.libs:/var/tmp/43/build-159/gcc:/var/tmp/43/build-159/powerpc-unknown-linux-gnu/libstdc++-v3/.libs:/var/tmp/43/build-159/powerpc-unknown-linux-gnu/libgomp/.libs:/var/tmp/43/build-159/./gcc:/var/tmp/43/build-159/./prev-gcc
FAIL: gfortran.dg/nint_2.f90  -O0  execution test

This is the compile command for the standard standard x.i file

/var/tmp/43/build-159/gcc/testsuite/gfortran/../../gfortran -v -save-temps
-B/var/tmp/43/build-159/gcc/testsuite/gfortran/../../
/var/tmp/43/gcc-4.3.0/gcc/testsuite/gfortran.dg/nint_2.f90   -O0  
-pedantic-errors 
-L/var/tmp/43/build-159/powerpc-unknown-linux-gnu/./libgfortran/.libs
-L/var/tmp/43/build-159/powerpc-unknown-linux-gnu/./libgfortran/.libs
-L/var/tmp/43/build-159/powerpc-unknown-linux-gnu/./libiberty  -lm   -o
./nint_2.exe  

The resulting compiler message:

Driving: /var/tmp/43/build-159/gcc/testsuite/gfortran/../../gfortran -v
-save-temps -B/var/tmp/43/build-159/gcc/testsuite/gfortran/../../
/var/tmp/43/gcc-4.3.0/gcc/testsuite/gfortran.dg/nint_2.f90 -O0 -pedantic-errors
-L/var/tmp/43/build-159/powerpc-unknown-linux-gnu/./libgfortran/.libs
-L/var/tmp/43/build-159/powerpc-unknown-linux-gnu/./libgfortran/.libs
-L/var/tmp/43/build-159/powerpc-unknown-linux-gnu/./libiberty -lgfortranbegin
-lgfortran -lm -o ./nint_2.exe -lgfortran -lm -shared-libgcc
Reading specs from /var/tmp/43/build-159/gcc/testsuite/gfortran/../../specs
Target: powerpc-unknown-linux-gnu
Configured with: ../gcc-4.3.0/configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --host=powerpc-unknown-linux-gnu
--build=powerpc-unknown-linux-gnu --enable-__cxa_atexit --enable-threads=posix
--enable-shared --enable-clocale=gnu --enable-bootstrap
--enable-languages=c,fortran,c++ --enable-altivec --disable-libssp
--disable-decimal-float --disable-libmudflap --disable-nls --disable-werror
--disable-multilib --with-ibmlongdouble --with-cpu=G4 --enable-clocale=gnu
--with-system-zlib
Thread model: posix
gcc version 4.3.0 20070831 (experimental) (GCC) 
 /var/tmp/43/build-159/gcc/testsuite/gfortran/../../f951
/var/tmp/43/gcc-4.3.0/gcc/testsuite/gfortran.dg/nint_2.f90 -quiet -dumpbase
nint_2.f90 -mcpu=G4 -auxbase nint_2 -O0 -pedantic-errors -version
-fintrinsic-modules-path /usr/lib/gcc/powerpc-unknown-linux-gnu/4.3.0/finclude
-o nint_2.s
GNU F95 (GCC) version 4.3.0 20070831 (experimental) (powerpc-unknown-linux-gnu)
        compiled by GNU C version 4.3.0 20070831 (experimental), GMP version
4.2.1, MPFR version 2.2.1-p5.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
 /var/tmp/43/build-159/gcc/testsuite/gfortran/../../as -mppc -maltivec -many -V
-Qy -o nint_2.o nint_2.s
GNU assembler version 2.18 (powerpc-unknown-linux-gnu) using BFD version (GNU
Binutils) 2.18
 /var/tmp/43/build-159/gcc/testsuite/gfortran/../../collect2 --eh-frame-hdr -V
-Qy -m elf32ppclinux -dynamic-linker /lib/ld.so.1 -o ./nint_2.exe
/usr/lib/crt1.o /usr/lib/crti.o
/var/tmp/43/build-159/gcc/testsuite/gfortran/../../crtbegin.o
-L/var/tmp/43/build-159/powerpc-unknown-linux-gnu/./libgfortran/.libs
-L/var/tmp/43/build-159/powerpc-unknown-linux-gnu/./libgfortran/.libs
-L/var/tmp/43/build-159/powerpc-unknown-linux-gnu/./libiberty
-L/var/tmp/43/build-159/gcc/testsuite/gfortran/../..
-L/usr/lib/gcc/powerpc-unknown-linux-gnu/4.3.0 nint_2.o -lgfortranbegin
-lgfortran -lm -lgfortran -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc
/var/tmp/43/build-159/gcc/testsuite/gfortran/../../crtsavres.o
/var/tmp/43/build-159/gcc/testsuite/gfortran/../../crtend.o /usr/lib/crtn.o
GNU ld (GNU Binutils) 2.18
  Supported emulations:
   elf32ppclinux
   elf32ppc
   elf32ppcsim
   elf64ppc


This is the resulting nint_2.s:


        .file   "nint_2.f90"
        .gnu_attribute 4, 1
        .gnu_attribute 8, 1
        .section        .rodata
        .align 2
        .type   options.0.1387, @object
        .size   options.0.1387, 28
options.0.1387:
        .long   102
        .long   127
        .long   1
        .long   0
        .long   0
        .long   1
        .long   0
        .section        ".text"
        .align 2
        .globl MAIN__
        .type   MAIN__, @function
MAIN__:
        stwu 1,-80(1)
        mflr 0
        stw 0,84(1)
        stw 31,76(1)
        mr 31,1
        li 3,7
        lis 9,options.0.1387@ha
        la 4,options.0.1387@l(9)
        bl _gfortran_set_options
        lis 9,.LC0@ha
        lfd 0,.LC0@l(9)
        stfd 0,40(31)
        li 9,0
        li 10,0
        stw 9,24(31)
        stw 10,28(31)
        lfd 1,40(31)
        bl lround
        mr 0,3
        stw 0,20(31)
        srawi 0,0,31
        stw 0,16(31)
        lwz 0,16(31)
        lwz 9,20(31)
        or 0,0,9
        cmpwi 7,0,0
        bne 7,.L2
        lwz 0,24(31)
        lwz 9,28(31)
        or 0,0,9
        cmpwi 7,0,0
        beq 7,.L3
.L2:
        bl _gfortran_abort
.L3:
        lis 9,.LC1@ha
        lfd 0,.LC1@l(9)
        stfd 0,40(31)
        li 9,0
        li 10,1
        stw 9,24(31)
        stw 10,28(31)
        lfd 1,40(31)
        bl lround
        mr 0,3
        stw 0,20(31)
        srawi 0,0,31
        stw 0,16(31)
        lwz 0,16(31)
        cmpwi 7,0,0
        bne 7,.L4
        lwz 0,20(31)
        cmpwi 7,0,1
        bne 7,.L4
        lwz 0,24(31)
        cmpwi 7,0,0
        bne 7,.L4
        lwz 0,28(31)
        cmpwi 7,0,1
        beq 7,.L23
.L4:
        bl _gfortran_abort
.L23:
        lis 9,.LC2@ha
        lfd 0,.LC2@l(9)
        stfd 0,40(31)
        li 9,0
        li 10,1
        stw 9,24(31)
        stw 10,28(31)
        lfd 1,40(31)
        bl lround
        mr 0,3
        stw 0,20(31)
        srawi 0,0,31
        stw 0,16(31)
        lwz 0,16(31)
        cmpwi 7,0,0
        bne 7,.L7
        lwz 0,20(31)
        cmpwi 7,0,1
        bne 7,.L7
        lwz 0,24(31)
        cmpwi 7,0,0
        bne 7,.L7
        lwz 0,28(31)
        cmpwi 7,0,1
        beq 7,.L24
.L7:
        bl _gfortran_abort
.L24:
        lis 9,.LC3@ha
        lfs 0,.LC3@l(9)
        stfs 0,12(31)
        li 0,0
        stw 0,32(31)
        lfs 1,12(31)
        bl lroundf
        mr 0,3
        stw 0,8(31)
        lwz 0,8(31)
        cmpwi 7,0,0
        bne 7,.L10
        lwz 0,32(31)
        cmpwi 7,0,0
        beq 7,.L11
.L10:
        bl _gfortran_abort
.L11:
        lis 9,.LC4@ha
        lfs 0,.LC4@l(9)
        stfs 0,12(31)
        li 0,1
        stw 0,32(31)
        lfs 1,12(31)
        bl lroundf
        mr 0,3
        stw 0,8(31)
        lwz 0,8(31)
        cmpwi 7,0,1
        bne 7,.L12
        lwz 0,32(31)
        cmpwi 7,0,1
        beq 7,.L13
.L12:
        bl _gfortran_abort
.L13:
        lis 9,.LC5@ha
        lfs 0,.LC5@l(9)
        stfs 0,12(31)
        li 0,1
        stw 0,32(31)
        lfs 1,12(31)
        bl lroundf
        mr 0,3
        stw 0,8(31)
        lwz 0,8(31)
        cmpwi 7,0,1
        bne 7,.L14
        lwz 0,32(31)
        cmpwi 7,0,1
        beq 7,.L15
.L14:
        bl _gfortran_abort
.L15:
        lis 9,.LC6@ha
        lfd 0,.LC6@l(9)
        stfd 0,40(31)
        lfd 1,40(31)
        bl llround
        mr 10,4
        mr 9,3
        stw 9,16(31)
        stw 10,20(31)
        lis 9,0x10
        li 10,1
        stw 9,24(31)
        stw 10,28(31)
        lwz 9,16(31)
        lwz 0,24(31)
        cmpw 7,9,0
        bne 7,.L16
        lwz 0,20(31)
        lwz 9,28(31)
        cmpw 7,0,9
        bne 7,.L16
        lwz 0,16(31)
        lis 9,0x10
        cmpw 7,0,9
        bne 7,.L16
        lwz 0,20(31)
        cmpwi 7,0,1
        beq 7,.L25
.L16:
        bl _gfortran_abort
.L25:
        lis 9,.LC7@ha
        lfd 0,.LC7@l(9)
        stfd 0,40(31)
        lfd 1,40(31)
        bl llround
        mr 10,4
        mr 9,3
        stw 9,16(31)
        stw 10,20(31)
        lis 9,0xffef
        ori 9,9,65535
        li 10,-1
        stw 9,24(31)
        stw 10,28(31)
        lwz 9,16(31)
        lwz 0,24(31)
        cmpw 7,9,0
        bne 7,.L19
        lwz 0,20(31)
        lwz 9,28(31)
        cmpw 7,0,9
        bne 7,.L19
        lwz 9,16(31)
        lis 0,0xffef
        ori 0,0,65535
        cmpw 7,9,0
        bne 7,.L19
        lwz 0,20(31)
        li 9,-1
        cmpw 7,0,9
        beq 7,.L26
.L19:
        bl _gfortran_abort
.L26:
        lwz 11,0(1)
        lwz 0,4(11)
        mtlr 0
        lwz 31,-4(11)
        mr 1,11
        blr
        .size   MAIN__, .-MAIN__
        .section        .rodata
        .align 3
.LC0:
        .long   1071644671
        .long   -1
        .align 3
.LC1:
        .long   1071644672
        .long   0
        .align 3
.LC2:
        .long   1071644672
        .long   1
        .align 2
.LC3:
        .long   1056964607
        .align 2
.LC4:
        .long   1056964608
        .align 2
.LC5:
        .long   1056964609
        .align 3
.LC6:
        .long   1127219200
        .long   1
        .align 3
.LC7:
        .long   -1020264448
        .long   1
        .ident  "GCC: (GNU) 4.3.0 20070831 (experimental)"
        .section        .note.GNU-stack,"",@progbits


The resulting executable came up with Abort.

I recompile with -O1 and execution was OK:

At your disposal for any further requests.


-- 
           Summary: nint_2.f90 abort compiled with -O0
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: michelin60 at gmail dot com
 GCC build triplet: powerpc
  GCC host triplet: powerpc
GCC target triplet: powerpc


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33271


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