public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/47018] New: ICE: in pre_and_rev_post_order_compute, at cfganal.c:1047 with -fnon-call-exceptions -fvar-tracking -g
@ 2010-12-20  2:46 zsojka at seznam dot cz
  2010-12-20  9:29 ` [Bug debug/47018] " jakub at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: zsojka at seznam dot cz @ 2010-12-20  2:46 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: ICE: in pre_and_rev_post_order_compute, at
                    cfganal.c:1047 with -fnon-call-exceptions
                    -fvar-tracking -g
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


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

Compiler output:
$ gcc -fnon-call-exceptions -fvar-tracking -g pr47018.C 
pr47018.C: In function 'void foo(float)':
pr47018.C:12:1: internal compiler error: in pre_and_rev_post_order_compute, at
cfganal.c:1047
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

(gdb) bt
#0  fancy_abort (file=0x125c3a8 "/mnt/svn/gcc-trunk/gcc/cfganal.c", line=1047, 
    function=0x125c5c0 "pre_and_rev_post_order_compute") at
/mnt/svn/gcc-trunk/gcc/diagnostic.c:892
#1  0x0000000000724d27 in pre_and_rev_post_order_compute (pre_order=0x0,
rev_post_order=0x19495c0, 
    include_entry_exit=0 '\000') at /mnt/svn/gcc-trunk/gcc/cfganal.c:1047
#2  0x0000000000bc7b41 in vt_find_locations () at
/mnt/svn/gcc-trunk/gcc/var-tracking.c:6025
#3  0x0000000000bc9475 in variable_tracking_main_1 () at
/mnt/svn/gcc-trunk/gcc/var-tracking.c:8522
#4  variable_tracking_main () at /mnt/svn/gcc-trunk/gcc/var-tracking.c:8567
#5  0x0000000000939d96 in execute_one_pass (pass=0x17bb680) at
/mnt/svn/gcc-trunk/gcc/passes.c:1553
#6  0x000000000093a085 in execute_pass_list (pass=0x17bb680) at
/mnt/svn/gcc-trunk/gcc/passes.c:1608
#7  0x000000000093a097 in execute_pass_list (pass=0x17b8180) at
/mnt/svn/gcc-trunk/gcc/passes.c:1609
#8  0x000000000093a097 in execute_pass_list (pass=0x17b81e0) at
/mnt/svn/gcc-trunk/gcc/passes.c:1609
#9  0x0000000000a7a2a6 in tree_rest_of_compilation (fndecl=0x7ffff5d1c600) at
/mnt/svn/gcc-trunk/gcc/tree-optimize.c:422
#10 0x0000000000c3f552 in cgraph_expand_function (node=0x7ffff5d1f2c0) at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1508
#11 0x0000000000c41f1d in cgraph_output_in_order () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1661
#12 cgraph_optimize () at /mnt/svn/gcc-trunk/gcc/cgraphunit.c:1822
#13 0x0000000000c421aa in cgraph_finalize_compilation_unit () at
/mnt/svn/gcc-trunk/gcc/cgraphunit.c:1031
#14 0x00000000005b75bd in cp_write_global_declarations () at
/mnt/svn/gcc-trunk/gcc/cp/decl2.c:3974
#15 0x0000000000a23b76 in compile_file (argc=16, argv=0x7fffffffdad8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:591
#16 do_compile (argc=16, argv=0x7fffffffdad8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:1874
#17 toplev_main (argc=16, argv=0x7fffffffdad8) at
/mnt/svn/gcc-trunk/gcc/toplev.c:1937
#18 0x00007ffff6586bbd in __libc_start_main () from /lib/libc.so.6
#19 0x00000000004fe711 in _start ()


Tested revisions:
r168061 - crash
4.5 r168062 - crash
4.4 r168062 - crash


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

* [Bug debug/47018] ICE: in pre_and_rev_post_order_compute, at cfganal.c:1047 with -fnon-call-exceptions -fvar-tracking -g
  2010-12-20  2:46 [Bug debug/47018] New: ICE: in pre_and_rev_post_order_compute, at cfganal.c:1047 with -fnon-call-exceptions -fvar-tracking -g zsojka at seznam dot cz
@ 2010-12-20  9:29 ` jakub at gcc dot gnu.org
  2011-12-15  1:54 ` pinskia at gcc dot gnu.org
  2021-08-13 21:25 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-20  9:29 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-20 09:29:41 UTC ---
The problem is that split2 pass splits:
(insn 6 3 7 2 (set (reg:DF 21 xmm0 [orig:59 D.2082 ] [59])            
        (float_extend:DF (reg/v:SF 21 xmm0 [orig:61 f ] [61]))) pr47018-2.C:11
136 {*extendsfdf2_sse}
     (expr_list:REG_EH_REGION (const_int 1 [0x1])
(nil)))

into:
(insn 36 3 37 2 (set (reg:V4SF 21 xmm0 [orig:61 f ] [61])
        (vec_select:V4SF (vec_concat:V8SF (reg:V4SF 21 xmm0 [orig:61 f ] [61])
                (reg:V4SF 21 xmm0 [orig:61 f ] [61]))
            (parallel [
                    (const_int 0 [0])
                    (const_int 4 [0x4])
                    (const_int 1 [0x1])
                    (const_int 5 [0x5])
                ]))) pr47018-2.C:11 1472 {vec_interleave_lowv4sf}
     (nil))

(insn 37 36 7 2 (set (reg:V2DF 21 xmm0 [orig:59 D.2082 ] [59])
        (float_extend:V2DF (vec_select:V2SF (reg:V4SF 21 xmm0 [orig:61 f ]
[61])
                (parallel [
                        (const_int 0 [0])
                        (const_int 1 [0x1])
                    ])))) pr47018-2.C:11 1462 {sse2_cvtps2pd}
     (nil))
and the split2 pass doesn't expect it needs to clean up the cfg and purge dead
eh edges etc.  With -O0 -fvar-tracking then var-tracking ICEs because there is
an unreachable bb.

With -fnon-call-exceptions float_extend in scalar float mode is considered as
may_trap_p while vector float mode is not:
    default:
      /* Any floating arithmetic may trap.  */
      if (SCALAR_FLOAT_MODE_P (GET_MODE (x))
          && flag_trapping_math)
        return 1;
If the reason why float_extend:DF is considered as maybe trapping is sNaN, then
doesn't vector mode float_extend trap too?  Either split2 needs to purge dead
eh edges and cleanup if needed, or the splitter is incorrect for
-fnon-call-exceptions, or may_trap_p is wring in only handling scalar float
modes and not vector float modes too.


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

* [Bug debug/47018] ICE: in pre_and_rev_post_order_compute, at cfganal.c:1047 with -fnon-call-exceptions -fvar-tracking -g
  2010-12-20  2:46 [Bug debug/47018] New: ICE: in pre_and_rev_post_order_compute, at cfganal.c:1047 with -fnon-call-exceptions -fvar-tracking -g zsojka at seznam dot cz
  2010-12-20  9:29 ` [Bug debug/47018] " jakub at gcc dot gnu.org
@ 2011-12-15  1:54 ` pinskia at gcc dot gnu.org
  2021-08-13 21:25 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-15  1:54 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-12-15
     Ever Confirmed|0                           |1

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-15 01:52:25 UTC ---
Confirmed.


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

* [Bug debug/47018] ICE: in pre_and_rev_post_order_compute, at cfganal.c:1047 with -fnon-call-exceptions -fvar-tracking -g
  2010-12-20  2:46 [Bug debug/47018] New: ICE: in pre_and_rev_post_order_compute, at cfganal.c:1047 with -fnon-call-exceptions -fvar-tracking -g zsojka at seznam dot cz
  2010-12-20  9:29 ` [Bug debug/47018] " jakub at gcc dot gnu.org
  2011-12-15  1:54 ` pinskia at gcc dot gnu.org
@ 2021-08-13 21:25 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-13 21:25 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|4.7.1                       |
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |8.0

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
> may_trap_p is wring in only handling scalar float modes and not vector float modes too.

That changed in r9-6203.

> Either split2 needs to purge dead eh edges and cleanup if needed
That was done in GCC 8: r8-5813.

So I think we can declare this as being fixed in GCC 8 with GCC 9 doing the
right thing for the eh edges anyways.

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

end of thread, other threads:[~2021-08-13 21:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-20  2:46 [Bug debug/47018] New: ICE: in pre_and_rev_post_order_compute, at cfganal.c:1047 with -fnon-call-exceptions -fvar-tracking -g zsojka at seznam dot cz
2010-12-20  9:29 ` [Bug debug/47018] " jakub at gcc dot gnu.org
2011-12-15  1:54 ` pinskia at gcc dot gnu.org
2021-08-13 21:25 ` pinskia 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).