public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/49800] New: segfault with -fsched-pressure -fdump-rtl-sched1
@ 2011-07-21  8:22 krebbel at gcc dot gnu.org
  2012-02-02  8:54 ` [Bug rtl-optimization/49800] [4.7 Regression] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: krebbel at gcc dot gnu.org @ 2011-07-21  8:22 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: segfault with -fsched-pressure -fdump-rtl-sched1
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: krebbel@gcc.gnu.org


t.c:

void foo (int a)
{
}


/home/andreas/clean/gcc-head-build/gcc/cc1 -O2 -fdump-rtl-sched1
-fsched-pressure -quiet t.c

Program received signal SIGSEGV, Segmentation fault.
print_pseudo_costs (f=0x80cc9340) at
/home/andreas/clean/gcc-head/gcc/ira-costs.c:1404
1404          if (REG_N_REFS (regno) <= 0)


#0  print_pseudo_costs (f=0x80cc9340) at
/home/andreas/clean/gcc-head/gcc/ira-costs.c:1404
#1  find_costs_and_classes (dump_file=0x80cc9340) at
/home/andreas/clean/gcc-head/gcc/ira-costs.c:1770
#2  0x00000000803edf9e in ira_set_pseudo_classes (dump_file=0x80cc9340)
    at /home/andreas/clean/gcc-head/gcc/ira-costs.c:2031
#3  0x000000008085cda8 in sched_init () at
/home/andreas/clean/gcc-head/gcc/haifa-sched.c:4250
#4  0x00000000808654f4 in haifa_sched_init () at
/home/andreas/clean/gcc-head/gcc/haifa-sched.c:4273
#5  0x00000000804dcbca in schedule_insns () at
/home/andreas/clean/gcc-head/gcc/sched-rgn.c:3299
#6  schedule_insns () at /home/andreas/clean/gcc-head/gcc/sched-rgn.c:3287
#7  0x00000000804dd4ce in rest_of_handle_sched () at
/home/andreas/clean/gcc-head/gcc/sched-rgn.c:3501

(gdb) p regstat_n_sets_and_refs
$1 = (regstat_n_sets_and_refs_t *) 0x0

regstat_n_sets_and_refs is not initialized when sched-pressure perhaps invoking
regstat_init_n_sets_and_refs in sched_init is needed?

This worked with 4.6. The check in print_pseudo_costs was:
  for (regno = max_reg_num () - 1; regno >= FIRST_PSEUDO_REGISTER; regno--)
    {
      if (regno_reg_rtx[regno] == NULL_RTX)
    continue;

and has been changed to:

  for (regno = max_reg_num () - 1; regno >= FIRST_PSEUDO_REGISTER; regno--)
    {
      if (REG_N_REFS (regno) <= 0)
    continue;


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

end of thread, other threads:[~2012-02-02 20:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-21  8:22 [Bug rtl-optimization/49800] New: segfault with -fsched-pressure -fdump-rtl-sched1 krebbel at gcc dot gnu.org
2012-02-02  8:54 ` [Bug rtl-optimization/49800] [4.7 Regression] " pinskia at gcc dot gnu.org
2012-02-02  8:59 ` krebbel at gcc dot gnu.org
2012-02-02 18:34 ` vmakarov at redhat dot com
2012-02-02 19:46 ` vmakarov at gcc dot gnu.org
2012-02-02 20:03 ` 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).