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/60576] New: [4.9 Regression] FAIL: gfortran.dg/assumed_rank_7.f90


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

            Bug ID: 60576
           Summary: [4.9 Regression] FAIL: gfortran.dg/assumed_rank_7.f90
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: jakub at gcc dot gnu.org

On Linux/x86-64, r208641 caused:

FAIL: gfortran.dg/assumed_rank_7.f90  -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions  execution test
FAIL: gfortran.dg/assumed_rank_7.f90  -O3 -fomit-frame-pointer -funroll-loops 
execution test

with -march=corei7:

Core was generated by `./assumed_rank_7.exe'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000003cddb47859 in __memcpy_ssse3_back () from /lib64/libc.so.6
(gdb) bt
#0  0x0000003cddb47859 in __memcpy_ssse3_back () from /lib64/libc.so.6
#1  0x00000000004010d2 in MAIN__ ()
#2  0x00000000004009ed in main ()
(gdb) 

   0x0000003cddb47856 <+182>:    add    %rdx,%rsi
=> 0x0000003cddb47859 <+185>:    movdqu -0x10(%rsi),%xmm0
   0x0000003cddb4785e <+190>:    lea    -0x10(%rdi),%r8

(gdb) p/x $rsi
$5 = 0x602040
(gdb) 

It only happens when running

make check-gfortran RUNTESTFLAGS="dg.exp=assumed_rank_7.f90
--target_board='unix{-march=corei7\ -fno-backtrace}'"

with

[hjl@gnu-mic-2 gfortran.dg]$ cat /proc/sys/kernel/randomize_va_space
2
[hjl@gnu-mic-2 gfortran.dg]$ 

Gfortran generates:

        movl    $168, %edx
                 ^^^ Copy 168 bytes
        movl    $at.2415+24, %esi
                         ^^ Start at at.2415 + 24
        movq    at.2415(%rip), %r8 
        movq    at.2415+8(%rip), %r9 
        leaq    40(%rsp), %rdi
        movq    $__vtab_MAIN___T.2395, 208(%rsp)
        movq    at.2415+16(%rip), %r10
        movq    %r8, 16(%rsp)
        movq    %r9, 24(%rsp)
        movq    %r10, 32(%rsp)
        call    memcpy
...
        .local  at.2415
        .comm   at.2415,72,64
                        ^^ 72 bytes

Write 168 bytes to (72 - 24) bytes leads to segfault.


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