public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/46804] New: [4.5/4.6 Regression] gfortran.dg/char_cshift_2.f90 FAILs with -fregmove
@ 2010-12-04 19:49 zsojka at seznam dot cz
  2010-12-06 14:56 ` [Bug rtl-optimization/46804] " zsojka at seznam dot cz
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: zsojka at seznam dot cz @ 2010-12-04 19:49 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.5/4.6 Regression] gfortran.dg/char_cshift_2.f90
                    FAILs with -fregmove
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


Created attachment 22632
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22632
auto-reduced testcase

Output:
$ /mnt/svn/gcc-trunk/binary-167453-lto-fortran-checking-yes-rtl-df/bin/gfortran
-O -fPIC -fexpensive-optimizations -fgcse -foptimize-register-move -fpeel-loops
-fno-tree-loop-optimize pr46804.f90
$ ./a.out 
Aborted

In the assembly, the problem is apparent (intel syntax):
...
    mov    r12d, DWORD PTR A.4.1573[rip+3]    # tmp310, A.4
    mov    DWORD PTR 16[rsp+r8*4], r12d    # shift3, tmp310
...
32bit (unaligned) value is loaded instead of sign-extend byte as is done
without -fregmove:
...
    movsx    r11d, BYTE PTR A.4.1573[rip+3]    # tmp310, A.4
    mov    DWORD PTR 16[rsp+r8*4], r11d    # shift3, tmp310
...

so shift3 contains invalid data

The problem seems to first appear in the 182r.regmove dump:
$ diff pr46804.f90.180r.ce2 pr46804.f90.182r.regmove
...
2009,2010c1409,1410
<         (sign_extend:SI (reg:QI 236))) pr46804.f90:17 132 {extendqisi2}
<      (expr_list:REG_DEAD (reg:QI 236)
---
>         (reg:SI 236)) pr46804.f90:17 64 {*movsi_internal}
>      (expr_list:REG_DEAD (reg:SI 236)
...

Output:
r167453 - fail
r158095 - fail
4.5 r166509 - fail
4.4 r166509 - OK


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-01-17  8:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-04 19:49 [Bug rtl-optimization/46804] New: [4.5/4.6 Regression] gfortran.dg/char_cshift_2.f90 FAILs with -fregmove zsojka at seznam dot cz
2010-12-06 14:56 ` [Bug rtl-optimization/46804] " zsojka at seznam dot cz
2010-12-06 16:39 ` hjl.tools at gmail dot com
2010-12-08 10:50 ` jakub at gcc dot gnu.org
2010-12-08 11:17 ` jakub at gcc dot gnu.org
2010-12-08 11:54 ` jakub at gcc dot gnu.org
2010-12-10 16:41 ` jakub at gcc dot gnu.org
2010-12-10 16:47 ` [Bug rtl-optimization/46804] [4.5 " jakub at gcc dot gnu.org
2010-12-16 13:11 ` rguenth at gcc dot gnu.org
2011-01-16 20:20 ` jakub at gcc dot gnu.org
2011-01-17  8:28 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).