public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/47489] New: ICE in print_pattern, at sched-vis.c:602 (affecting mips, with slim RTL dumps)
@ 2011-01-27 12:05 mail@joachim-breitner.de
  2011-01-28 10:04 ` [Bug rtl-optimization/47489] " abel at gcc dot gnu.org
  2012-08-06 11:19 ` [Bug rtl-optimization/47489] ICE with -fdump-rtl-mach-slim and -O1 on mips (and other targets which have SEQUENCEs) steven at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: mail@joachim-breitner.de @ 2011-01-27 12:05 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: ICE in print_pattern, at sched-vis.c:602 (affecting
                    mips, with slim RTL dumps)
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mail@joachim-breitner.de


Hi,

I have hit a ICE and could reduce it to the following minimal example:

$ cat bug-demo.c
int func() {
    return 0;
}

$ build-mips/gcc/cc1 -O1 -fdump-rtl-mach-slim  bug-demo.c 
 func
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data> <visibility> <early_local_cleanups> <emutls> <whole-program>
<ipa-profile> <inline> <pure-const> <static-var>Assembling functions:
 func
bug-demo.c: In function ‘func’:
bug-demo.c:3:1: internal compiler error: in print_pattern, at sched-vis.c:602
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

It does not happen with -fdump-rtl-mach, i.e. without slim.

I could not reproduce it by passing individual "-f..." flags instead of -O2,
even though the output of "--help", which mentions which flags are
enabled/disabled, is identical.

This is gcc-4.6 snapshot 20101225, configured using the command line:
../gcc-4.6-20101225/configure --prefix=$PWD/../install  --disable-bootstrap
--disable-multilib --enable-stage1-languages=c
--disable-lib{gcj,ada,ssp,mudflap,gomp} --enable-languages=c
--target=mips-linux


Thanks,
Joachim


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

* [Bug rtl-optimization/47489] ICE in print_pattern, at sched-vis.c:602 (affecting mips, with slim RTL dumps)
  2011-01-27 12:05 [Bug rtl-optimization/47489] New: ICE in print_pattern, at sched-vis.c:602 (affecting mips, with slim RTL dumps) mail@joachim-breitner.de
@ 2011-01-28 10:04 ` abel at gcc dot gnu.org
  2012-08-06 11:19 ` [Bug rtl-optimization/47489] ICE with -fdump-rtl-mach-slim and -O1 on mips (and other targets which have SEQUENCEs) steven at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: abel at gcc dot gnu.org @ 2011-01-28 10:04 UTC (permalink / raw)
  To: gcc-bugs

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

Andrey Belevantsev <abel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.01.28 09:43:05
                 CC|                            |abel at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Andrey Belevantsev <abel at gcc dot gnu.org> 2011-01-28 09:43:05 UTC ---
Confirmed.  This is because we deliberately abort on SEQUENCEs here since 2002
(rev. 54497) because of:

    2002-06-05  David S. Miller  <davem@redhat.com>

        Delete SEQUENCE rtl usage outside of reorg and ssa passes.

So either we reinstate the hunk deleted back there like with patch below, or we
document that slim dumps cannot be requested for machine reorg and later
passes.

diff --git a/gcc/sched-vis.c b/gcc/sched-vis.c
index 25a0b60..331ccbf 100644
--- a/gcc/sched-vis.c
+++ b/gcc/sched-vis.c
@@ -599,8 +599,19 @@ print_pattern (char *buf, const_rtx x, int verbose)
       }
       break;
     case SEQUENCE:
-      /* Should never see SEQUENCE codes until after reorg.  */
-      gcc_unreachable ();
+      {
+       int i;
+
+       sprintf (t1, "%%{");
+       for (i = 0; i < XVECLEN (x, 0); i++)
+         {
+           print_insn (t2, XVECEXP (x, 0, i), verbose);
+           sprintf (t3, "%s%s;", t1, t2);
+           strcpy (t1, t3);
+         }
+       sprintf (buf, "%s%%}", t1);
+      }
+      break;
     case ASM_INPUT:
       sprintf (buf, "asm {%s}", XSTR (x, 0));
       break;


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

* [Bug rtl-optimization/47489] ICE with -fdump-rtl-mach-slim  and -O1 on mips (and other targets which have SEQUENCEs)
  2011-01-27 12:05 [Bug rtl-optimization/47489] New: ICE in print_pattern, at sched-vis.c:602 (affecting mips, with slim RTL dumps) mail@joachim-breitner.de
  2011-01-28 10:04 ` [Bug rtl-optimization/47489] " abel at gcc dot gnu.org
@ 2012-08-06 11:19 ` steven at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: steven at gcc dot gnu.org @ 2012-08-06 11:19 UTC (permalink / raw)
  To: gcc-bugs

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

Steven Bosscher <steven at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to work|                            |4.8.0
         Resolution|                            |FIXED
      Known to fail|                            |4.6.3, 4.7.1

--- Comment #2 from Steven Bosscher <steven at gcc dot gnu.org> 2012-08-06 11:18:34 UTC ---
Accidentally fixed for GCC 4.8 by r190133.
(http://gcc.gnu.org/viewcvs?view=revision&revision=190113)


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

end of thread, other threads:[~2012-08-06 11:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-27 12:05 [Bug rtl-optimization/47489] New: ICE in print_pattern, at sched-vis.c:602 (affecting mips, with slim RTL dumps) mail@joachim-breitner.de
2011-01-28 10:04 ` [Bug rtl-optimization/47489] " abel at gcc dot gnu.org
2012-08-06 11:19 ` [Bug rtl-optimization/47489] ICE with -fdump-rtl-mach-slim and -O1 on mips (and other targets which have SEQUENCEs) steven 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).