public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/63618] New: CSE at IRA pass delete SET_GOT which is used later
@ 2014-10-22 15:09 evstupac at gmail dot com
  2014-10-22 15:12 ` [Bug rtl-optimization/63618] " evstupac at gmail dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: evstupac at gmail dot com @ 2014-10-22 15:09 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 63618
           Summary: CSE at IRA pass delete SET_GOT which is used later
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: evstupac at gmail dot com

Test failed on execution compiled with:
gcc elim_set_got.c -fPIE -m32 -msse4.2 -O2 -fno-inline -mtune=corei7
./a.out
Segmentation fault (core dumped)

That occurs because CSE delete SET_GOT at IRA as it has no uses.
However the instruction:

(insn 20 17 21 3 (set (mem:TF (pre_dec:SI (reg/f:SI 7 sp)) [2  S16 A128])
        (const_double:TF 1.0e+9 [0x0.ee6b28p+30])) elim_setgot.c:26 121
{*pushtf} 
     (expr_list:REG_ARGS_SIZE (const_int 16 [0x10]) 
        (nil))) 

have hidden use of GOT register as it is split into:

(insn 45 47 46 3 (set (reg:SI 0 ax [92]) 
        (plus:SI (reg:SI 0 ax [87]) 
            (const:SI (unspec:SI [ 
                        (symbol_ref/u:SI ("*.LC2") [flags 0x2]) 
                    ] UNSPEC_GOTOFF)))) elim_setgot.c:26 213 {*leasi} 
     (expr_list:REG_EQUAL (symbol_ref/u:SI ("*.LC2") [flags 0x2]) 
        (nil))) 
(insn 46 45 20 3 (set (reg:TF 23 xmm2 [93]) 
        (mem/u/c:TF (reg:SI 0 ax [92]) [2  S16 A128])) elim_setgot.c:26 126
{*movtf_internal} 
     (nil))


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

end of thread, other threads:[~2014-10-23 21:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-22 15:09 [Bug rtl-optimization/63618] New: CSE at IRA pass delete SET_GOT which is used later evstupac at gmail dot com
2014-10-22 15:12 ` [Bug rtl-optimization/63618] " evstupac at gmail dot com
2014-10-22 16:21 ` evstupac at gmail dot com
2014-10-22 21:35 ` law at redhat dot com
2014-10-22 21:41 ` law at redhat dot com
2014-10-23 16:52 ` iverbin at gcc dot gnu.org
2014-10-23 21:41 ` evstupac at gmail dot com

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).