public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/48757] New: internal compiler error: in compensate_edge, at reg-stack.c:2788
@ 2011-04-24 22:06 chilikin.k at gmail dot com
  2011-04-26  8:14 ` [Bug rtl-optimization/48757] " ubizjak at gmail dot com
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: chilikin.k at gmail dot com @ 2011-04-24 22:06 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: internal compiler error: in compensate_edge, at
                    reg-stack.c:2788
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: chilikin.k@gmail.com


Created attachment 24093
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24093
fconc64.f (from CERNLIB / MATHLIB, simplified)

Version of compiler: 4.6.0
The same problem exists in version 4.5.2

System type and configuration of the compiler:
Target: i686-pc-linux-gnu
Configured with: ./configure --prefix=/opt/gcc-4.6.0/
Thread model: posix

Triggering the bug (fconc64.f is attached file):
gfortran -c -O2 fconc64.f
The bug does not occur without optimization flag -O2

Compiler output:
fconc64.f:18.72:

      ASSIGN 1 TO JP                                                    
                                                                        1
Warning: Deleted feature: ASSIGN statement at (1)
fconc64.f:20.72:

    1 ASSIGN 2 TO JP                                                    
                                                                        1
Warning: Deleted feature: ASSIGN statement at (1)
fconc64.f:24.72:

   12 ASSIGN 3 TO JP                                                    
                                                                        1
Warning: Deleted feature: ASSIGN statement at (1)
fconc64.f:28.72:

   13 ASSIGN 4 TO JP                                                    
                                                                        1
Warning: Deleted feature: ASSIGN statement at (1)
fconc64.f:36.38:

       IF(ABS(R-RR) .LT. EPS) GO TO JP, (1,2,3,4)                       
                                      1
Warning: Deleted feature: Assigned GOTO statement at (1)
fconc64.f:43.38:

       IF(ABS(R-RR) .LT. EPS) GO TO JP, (1,2,3,4)                       
                                      1
Warning: Deleted feature: Assigned GOTO statement at (1)
fconc64.f: In function 'dfconc':
fconc64.f:52:0: internal compiler error: in compensate_edge, at
reg-stack.c:2788
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug rtl-optimization/48757] internal compiler error: in compensate_edge, at reg-stack.c:2788
  2011-04-24 22:06 [Bug rtl-optimization/48757] New: internal compiler error: in compensate_edge, at reg-stack.c:2788 chilikin.k at gmail dot com
@ 2011-04-26  8:14 ` ubizjak at gmail dot com
  2011-04-26  8:34 ` [Bug rtl-optimization/48757] [4.5/4.6/4.7 Regression] " ubizjak at gmail dot com
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ubizjak at gmail dot com @ 2011-04-26  8:14 UTC (permalink / raw)
  To: gcc-bugs

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

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |i686-pc-linux-gnu
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.04.26 08:13:21
                 CC|                            |ubizjak at gmail dot com
     Ever Confirmed|0                           |1
      Known to fail|                            |4.5.3, 4.6.1, 4.7.0

--- Comment #1 from Uros Bizjak <ubizjak at gmail dot com> 2011-04-26 08:13:21 UTC ---
Confirmed with current mainline (-O2 -m32), we ICE in reg-stack.c,
compensate_edge:

  /* We don't support abnormal edges.  Global takes care to
     avoid any live register across them, so we should never
     have to insert instructions on such edges.  */
  gcc_assert (! (e->flags & EDGE_ABNORMAL));

Where _.f.210r.stack shows that we want to compensate abnormal edges from bb 8:

Edge 8->13: no changes needed
Edge 8->9: correcting stack to empty
Edge 8->12: correcting stack to empty
Edge 8->11: correcting stack to empty

...

;; End of basic block 8 -> ( 13 9 12 11)
;; lr  out      7 [sp] 10 [st(2)] 11 [st(3)]
;; live  out      7 [sp] 10 [st(2)] 11 [st(3)]


;; Succ edge  13 [25.0%]  (ab,loop_exit)
;; Succ edge  9 [25.0%]  (ab,loop_exit)
;; Succ edge  12 [25.0%]  (ab,loop_exit)
;; Succ edge  11 [25.0%]  (ab)

Apparently, global does not work as expected.


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

* [Bug rtl-optimization/48757] [4.5/4.6/4.7 Regression] internal compiler error: in compensate_edge, at reg-stack.c:2788
  2011-04-24 22:06 [Bug rtl-optimization/48757] New: internal compiler error: in compensate_edge, at reg-stack.c:2788 chilikin.k at gmail dot com
  2011-04-26  8:14 ` [Bug rtl-optimization/48757] " ubizjak at gmail dot com
@ 2011-04-26  8:34 ` ubizjak at gmail dot com
  2011-04-26  8:39 ` ubizjak at gmail dot com
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ubizjak at gmail dot com @ 2011-04-26  8:34 UTC (permalink / raw)
  To: gcc-bugs

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

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.5.3


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

* [Bug rtl-optimization/48757] [4.5/4.6/4.7 Regression] internal compiler error: in compensate_edge, at reg-stack.c:2788
  2011-04-24 22:06 [Bug rtl-optimization/48757] New: internal compiler error: in compensate_edge, at reg-stack.c:2788 chilikin.k at gmail dot com
  2011-04-26  8:14 ` [Bug rtl-optimization/48757] " ubizjak at gmail dot com
  2011-04-26  8:34 ` [Bug rtl-optimization/48757] [4.5/4.6/4.7 Regression] " ubizjak at gmail dot com
@ 2011-04-26  8:39 ` ubizjak at gmail dot com
  2011-04-26  9:56 ` jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ubizjak at gmail dot com @ 2011-04-26  8:39 UTC (permalink / raw)
  To: gcc-bugs

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

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.4.7
            Summary|internal compiler error: in |[4.5/4.6/4.7 Regression]
                   |compensate_edge, at         |internal compiler error: in
                   |reg-stack.c:2788            |compensate_edge, at
                   |                            |reg-stack.c:2788

--- Comment #2 from Uros Bizjak <ubizjak at gmail dot com> 2011-04-26 08:33:43 UTC ---
Regression from 4.4.


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

* [Bug rtl-optimization/48757] [4.5/4.6/4.7 Regression] internal compiler error: in compensate_edge, at reg-stack.c:2788
  2011-04-24 22:06 [Bug rtl-optimization/48757] New: internal compiler error: in compensate_edge, at reg-stack.c:2788 chilikin.k at gmail dot com
                   ` (2 preceding siblings ...)
  2011-04-26  8:39 ` ubizjak at gmail dot com
@ 2011-04-26  9:56 ` jakub at gcc dot gnu.org
  2011-04-28 15:16 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-04-26  9:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-04-26 09:54:14 UTC ---
Started with http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=152448


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

* [Bug rtl-optimization/48757] [4.5/4.6/4.7 Regression] internal compiler error: in compensate_edge, at reg-stack.c:2788
  2011-04-24 22:06 [Bug rtl-optimization/48757] New: internal compiler error: in compensate_edge, at reg-stack.c:2788 chilikin.k at gmail dot com
                   ` (3 preceding siblings ...)
  2011-04-26  9:56 ` jakub at gcc dot gnu.org
@ 2011-04-28 15:16 ` rguenth at gcc dot gnu.org
  2011-05-02 17:57 ` ro at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-28 15:16 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.5.3                       |4.5.4

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-04-28 14:51:33 UTC ---
GCC 4.5.3 is being released, adjusting target milestone.


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

* [Bug rtl-optimization/48757] [4.5/4.6/4.7 Regression] internal compiler error: in compensate_edge, at reg-stack.c:2788
  2011-04-24 22:06 [Bug rtl-optimization/48757] New: internal compiler error: in compensate_edge, at reg-stack.c:2788 chilikin.k at gmail dot com
                   ` (4 preceding siblings ...)
  2011-04-28 15:16 ` rguenth at gcc dot gnu.org
@ 2011-05-02 17:57 ` ro at gcc dot gnu.org
  2011-05-02 18:22 ` ebotcazou at gcc dot gnu.org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ro at gcc dot gnu.org @ 2011-05-02 17:57 UTC (permalink / raw)
  To: gcc-bugs

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

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot
                   |                            |gnu.org, ro at gcc dot
                   |                            |gnu.org

--- Comment #5 from Rainer Orth <ro at gcc dot gnu.org> 2011-05-02 17:31:34 UTC ---
This also causes the ACATS test cxg2001 to fail on i386-pc-solaris2:

+===========================GNAT BUG DETECTED==============================+
| 4.7.0 20110429 (experimental) [trunk revision 173183] (i386-pc-solaris2.11)
GCC error:|
| in compensate_edge, at reg-stack.c:2781                                  |
| Error detected around cxg2001.adb:322:5                                  |

  Rainer


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

* [Bug rtl-optimization/48757] [4.5/4.6/4.7 Regression] internal compiler error: in compensate_edge, at reg-stack.c:2788
  2011-04-24 22:06 [Bug rtl-optimization/48757] New: internal compiler error: in compensate_edge, at reg-stack.c:2788 chilikin.k at gmail dot com
                   ` (5 preceding siblings ...)
  2011-05-02 17:57 ` ro at gcc dot gnu.org
@ 2011-05-02 18:22 ` ebotcazou at gcc dot gnu.org
  2011-05-25  2:47 ` vmakarov at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-05-02 18:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-05-02 18:10:58 UTC ---
> This also causes the ACATS test cxg2001 to fail on i386-pc-solaris2:

This one is PR rtl-optimization/48633.


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

* [Bug rtl-optimization/48757] [4.5/4.6/4.7 Regression] internal compiler error: in compensate_edge, at reg-stack.c:2788
  2011-04-24 22:06 [Bug rtl-optimization/48757] New: internal compiler error: in compensate_edge, at reg-stack.c:2788 chilikin.k at gmail dot com
                   ` (6 preceding siblings ...)
  2011-05-02 18:22 ` ebotcazou at gcc dot gnu.org
@ 2011-05-25  2:47 ` vmakarov at gcc dot gnu.org
  2011-06-12 13:35 ` [Bug rtl-optimization/48757] [4.5/4.6 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2011-05-25  2:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Vladimir Makarov <vmakarov at gcc dot gnu.org> 2011-05-25 02:16:00 UTC ---
Author: vmakarov
Date: Wed May 25 02:15:58 2011
New Revision: 174165

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174165
Log:
2011-05-24  Vladimir Makarov  <vmakarov@redhat.com>

    PR rtl-optimization/48757
    * ira-build.c (loop_with_eh_edge_p): Rename to
    loop_with_complex_edge_p, check edges on complexity, make function
    conditional.
    (mark_loops_for_removal): Make call of loop_with_complex_edge_p
    conditional.

2011-05-24  Vladimir Makarov  <vmakarov@redhat.com>

    PR rtl-optimization/48757
    * gfortran.dg/pr48757.f:  New test case.


Added:
    trunk/gcc/testsuite/gfortran.dg/pr48757.f
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ira-build.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/48757] [4.5/4.6 Regression] internal compiler error: in compensate_edge, at reg-stack.c:2788
  2011-04-24 22:06 [Bug rtl-optimization/48757] New: internal compiler error: in compensate_edge, at reg-stack.c:2788 chilikin.k at gmail dot com
                   ` (7 preceding siblings ...)
  2011-05-25  2:47 ` vmakarov at gcc dot gnu.org
@ 2011-06-12 13:35 ` rguenth at gcc dot gnu.org
  2011-07-14  8:51 ` ebotcazou at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-06-12 13:35 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
             Status|NEW                         |ASSIGNED
      Known to work|                            |4.7.0
         AssignedTo|unassigned at gcc dot       |vmakarov at gcc dot gnu.org
                   |gnu.org                     |
            Summary|[4.5/4.6/4.7 Regression]    |[4.5/4.6 Regression]
                   |internal compiler error: in |internal compiler error: in
                   |compensate_edge, at         |compensate_edge, at
                   |reg-stack.c:2788            |reg-stack.c:2788
      Known to fail|4.7.0                       |

--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-12 13:32:02 UTC ---
Fixed on trunk(?).


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

* [Bug rtl-optimization/48757] [4.5/4.6 Regression] internal compiler error: in compensate_edge, at reg-stack.c:2788
  2011-04-24 22:06 [Bug rtl-optimization/48757] New: internal compiler error: in compensate_edge, at reg-stack.c:2788 chilikin.k at gmail dot com
                   ` (8 preceding siblings ...)
  2011-06-12 13:35 ` [Bug rtl-optimization/48757] [4.5/4.6 " rguenth at gcc dot gnu.org
@ 2011-07-14  8:51 ` ebotcazou at gcc dot gnu.org
  2012-07-02 11:27 ` rguenth at gcc dot gnu.org
  2013-04-12 16:17 ` [Bug rtl-optimization/48757] [4.6 " jakub at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-07-14  8:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-07-14 08:50:48 UTC ---
Vlad, is the fix backportable to release branches, at least the 4.6 branch?


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

* [Bug rtl-optimization/48757] [4.5/4.6 Regression] internal compiler error: in compensate_edge, at reg-stack.c:2788
  2011-04-24 22:06 [Bug rtl-optimization/48757] New: internal compiler error: in compensate_edge, at reg-stack.c:2788 chilikin.k at gmail dot com
                   ` (9 preceding siblings ...)
  2011-07-14  8:51 ` ebotcazou at gcc dot gnu.org
@ 2012-07-02 11:27 ` rguenth at gcc dot gnu.org
  2013-04-12 16:17 ` [Bug rtl-optimization/48757] [4.6 " jakub at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-02 11:27 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.5.4                       |4.6.4

--- Comment #10 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-02 11:26:30 UTC ---
The 4.5 branch is being closed, adjusting target milestone.


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

* [Bug rtl-optimization/48757] [4.6 Regression] internal compiler error: in compensate_edge, at reg-stack.c:2788
  2011-04-24 22:06 [Bug rtl-optimization/48757] New: internal compiler error: in compensate_edge, at reg-stack.c:2788 chilikin.k at gmail dot com
                   ` (10 preceding siblings ...)
  2012-07-02 11:27 ` rguenth at gcc dot gnu.org
@ 2013-04-12 16:17 ` jakub at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-12 16:17 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.6.4                       |4.7.0

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-12 16:17:44 UTC ---
The 4.6 branch has been closed, fixed in GCC 4.7.0.


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

end of thread, other threads:[~2013-04-12 16:17 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-24 22:06 [Bug rtl-optimization/48757] New: internal compiler error: in compensate_edge, at reg-stack.c:2788 chilikin.k at gmail dot com
2011-04-26  8:14 ` [Bug rtl-optimization/48757] " ubizjak at gmail dot com
2011-04-26  8:34 ` [Bug rtl-optimization/48757] [4.5/4.6/4.7 Regression] " ubizjak at gmail dot com
2011-04-26  8:39 ` ubizjak at gmail dot com
2011-04-26  9:56 ` jakub at gcc dot gnu.org
2011-04-28 15:16 ` rguenth at gcc dot gnu.org
2011-05-02 17:57 ` ro at gcc dot gnu.org
2011-05-02 18:22 ` ebotcazou at gcc dot gnu.org
2011-05-25  2:47 ` vmakarov at gcc dot gnu.org
2011-06-12 13:35 ` [Bug rtl-optimization/48757] [4.5/4.6 " rguenth at gcc dot gnu.org
2011-07-14  8:51 ` ebotcazou at gcc dot gnu.org
2012-07-02 11:27 ` rguenth at gcc dot gnu.org
2013-04-12 16:17 ` [Bug rtl-optimization/48757] [4.6 " 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).