public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/40026]  New: [4.5 Regression] ICE during gimplify_init_constructor
@ 2009-05-05 15:05 rguenth at gcc dot gnu dot org
  2009-05-05 15:12 ` [Bug c/40026] " rguenth at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-05-05 15:05 UTC (permalink / raw)
  To: gcc-bugs

The linux kernel build on the gcc.opensuse.org base tester currently fails with

./cc1 -quiet sched.i
kernel/sched.c: In function 'build_sched_domains':
kernel/sched.c:6325: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Program received signal SIGSEGV, Segmentation fault.
0x00000000007caa09 in is_gimple_mem_rhs_or_call (t=0x0)
    at /space/rguenther/src/svn/trunk/gcc/gimplify.c:633
633       if (is_gimple_reg_type (TREE_TYPE (t)))
(gdb) bt
#0  0x00000000007caa09 in is_gimple_mem_rhs_or_call (t=0x0)
    at /space/rguenther/src/svn/trunk/gcc/gimplify.c:633
#1  0x00000000007f7fb0 in gimplify_expr (expr_p=0x7ffff4efb7f8, 
    pre_p=0x7fffffffb648, post_p=0x7fffffff8e28, 
    gimple_test_f=0x7ca9ed <is_gimple_mem_rhs_or_call>, fallback=1)
    at /space/rguenther/src/svn/trunk/gcc/gimplify.c:7159
#2  0x00000000007e4023 in gimplify_modify_expr (expr_p=0x7fffffff9718, 
    pre_p=0x7fffffffb648, post_p=0x7fffffff8e28, want_value=0 '\0')
    at /space/rguenther/src/svn/trunk/gcc/gimplify.c:4379
#3  0x00000000007f391d in gimplify_expr (expr_p=0x7fffffff9718, 
    pre_p=0x7fffffffb648, post_p=0x7fffffff8e28, 
    gimple_test_f=0x7bff1c <is_gimple_stmt>, fallback=0)
    at /space/rguenther/src/svn/trunk/gcc/gimplify.c:6516
#4  0x00000000007e8724 in gimplify_stmt (stmt_p=0x7fffffff9718, 
    seq_p=0x7fffffffb648) at /space/rguenther/src/svn/trunk/gcc/gimplify.c:5162
#5  0x00000000007ca161 in gimplify_and_add (t=0x7ffff4efb7c0, 
    seq_p=0x7fffffffb648) at /space/rguenther/src/svn/trunk/gcc/gimplify.c:390
#6  0x00000000007df18b in gimplify_init_ctor_eval (object=0x7ffff4efb240, 
    elts=0x7ffff4ef6200, pre_p=0x7fffffffb648, cleared=1 '\1')
    at /space/rguenther/src/svn/trunk/gcc/gimplify.c:3490
#7  0x00000000007e0c65 in gimplify_init_constructor (expr_p=0x7ffff4ed8f10, 
    pre_p=0x7fffffffb648, post_p=0x7fffffffa288, want_value=0 '\0', 
    notify_temp_creation=0 '\0')


-- 
           Summary: [4.5 Regression] ICE during gimplify_init_constructor
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


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


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

* [Bug c/40026] [4.5 Regression] ICE during gimplify_init_constructor
  2009-05-05 15:05 [Bug middle-end/40026] New: [4.5 Regression] ICE during gimplify_init_constructor rguenth at gcc dot gnu dot org
@ 2009-05-05 15:12 ` rguenth at gcc dot gnu dot org
  2009-05-05 15:54 ` mmitchel at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-05-05 15:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2009-05-05 15:12 -------
Reduced testcase, maybe due to the C const expression changes(?)

typedef struct {
    unsigned long bits[(((128)+64 -1)/64)];
} cpumask_t;
struct sched_domain {
    cpumask_t span;
    int flags;
};
void
cpu_to_allnodes_group(struct sched_domain *sd, int sched_smt_power_savings)
{
  *sd = (struct sched_domain) {
      .span = (cpumask_t) { { [0 ... (((128)+64 -1)/64)-1] = 0UL } },
      .flags = (sched_smt_power_savings ? 256 : 0),
  };
}


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|middle-end                  |c
   Target Milestone|---                         |4.5.0


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


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

* [Bug c/40026] [4.5 Regression] ICE during gimplify_init_constructor
  2009-05-05 15:05 [Bug middle-end/40026] New: [4.5 Regression] ICE during gimplify_init_constructor rguenth at gcc dot gnu dot org
  2009-05-05 15:12 ` [Bug c/40026] " rguenth at gcc dot gnu dot org
@ 2009-05-05 15:54 ` mmitchel at gcc dot gnu dot org
  2009-05-06 11:09 ` joseph at codesourcery dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2009-05-05 15:54 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug c/40026] [4.5 Regression] ICE during gimplify_init_constructor
  2009-05-05 15:05 [Bug middle-end/40026] New: [4.5 Regression] ICE during gimplify_init_constructor rguenth at gcc dot gnu dot org
  2009-05-05 15:12 ` [Bug c/40026] " rguenth at gcc dot gnu dot org
  2009-05-05 15:54 ` mmitchel at gcc dot gnu dot org
@ 2009-05-06 11:09 ` joseph at codesourcery dot com
  2009-05-06 11:42 ` rguenther at suse dot de
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: joseph at codesourcery dot com @ 2009-05-06 11:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from joseph at codesourcery dot com  2009-05-06 11:09 -------
Subject: Re:  [4.5 Regression] ICE during gimplify_init_constructor

On Tue, 5 May 2009, rguenth at gcc dot gnu dot org wrote:

> Reduced testcase, maybe due to the C const expression changes(?)

I see nothing in the reported information about this bug to suggest this 
(rather than, say, the move of COMPOUND_LITERAL_EXPR handling to 
language-independent code).  What do you think is wrong about the trees 
being passed by the C front end to the gimplifier?


-- 


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


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

* [Bug c/40026] [4.5 Regression] ICE during gimplify_init_constructor
  2009-05-05 15:05 [Bug middle-end/40026] New: [4.5 Regression] ICE during gimplify_init_constructor rguenth at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-05-06 11:09 ` joseph at codesourcery dot com
@ 2009-05-06 11:42 ` rguenther at suse dot de
  2009-05-09 18:09 ` [Bug middle-end/40026] " jsm28 at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenther at suse dot de @ 2009-05-06 11:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenther at suse dot de  2009-05-06 11:41 -------
Subject: Re:  [4.5 Regression] ICE during
 gimplify_init_constructor

On Wed, 6 May 2009, joseph at codesourcery dot com wrote:

> Subject: Re:  [4.5 Regression] ICE during gimplify_init_constructor
> 
> On Tue, 5 May 2009, rguenth at gcc dot gnu dot org wrote:
> 
> > Reduced testcase, maybe due to the C const expression changes(?)
> 
> I see nothing in the reported information about this bug to suggest this 
> (rather than, say, the move of COMPOUND_LITERAL_EXPR handling to 
> language-independent code).  What do you think is wrong about the trees 
> being passed by the C front end to the gimplifier?

It was just wild guessing - the COMPOUND_LITERAL_EXPR changes may be
indeed a better guess.

Richard.


-- 


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


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

* [Bug middle-end/40026] [4.5 Regression] ICE during gimplify_init_constructor
  2009-05-05 15:05 [Bug middle-end/40026] New: [4.5 Regression] ICE during gimplify_init_constructor rguenth at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-05-06 11:42 ` rguenther at suse dot de
@ 2009-05-09 18:09 ` jsm28 at gcc dot gnu dot org
  2009-05-11  7:02 ` bonzini at gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-05-09 18:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jsm28 at gcc dot gnu dot org  2009-05-09 18:09 -------
gimplify_init_constructor does

  tree ctor = TREE_OPERAND (*expr_p, 1);
...
  new_ctor = optimize_compound_literals_in_ctor (ctor);
  elts = CONSTRUCTOR_ELTS (new_ctor);
...
            gimplify_init_ctor_preeval (&TREE_OPERAND (*expr_p, 1),
                                        pre_p, post_p, &preeval_data);
(which changes a COND_EXPR to have void type, updating the pointer to
that COND_EXPR in TREE_OPERAND (*expr_p, 1) - the old constructor -
to point to the gimplifier-generated temorary instead)
...
        if (!cleared || num_nonzero_elements > 0)
          gimplify_init_ctor_eval (object, elts, pre_p, cleared);
(which goes through the elements of the new constructor, finds the
modified COND_EXPR and ends up segfaulting because of that).

This looks like the compound literal changes must be responsible and
that it is a gimplifier bug.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bonzini at gnu dot org
             Status|UNCONFIRMED                 |NEW
          Component|c                           |middle-end
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-05-09 18:09:03
               date|                            |


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


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

* [Bug middle-end/40026] [4.5 Regression] ICE during gimplify_init_constructor
  2009-05-05 15:05 [Bug middle-end/40026] New: [4.5 Regression] ICE during gimplify_init_constructor rguenth at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2009-05-09 18:09 ` [Bug middle-end/40026] " jsm28 at gcc dot gnu dot org
@ 2009-05-11  7:02 ` bonzini at gnu dot org
  2009-05-11  9:04 ` bonzini at gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: bonzini at gnu dot org @ 2009-05-11  7:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from bonzini at gnu dot org  2009-05-11 07:02 -------
I have a patch.  It's just that TREE_OPERAND (*expr, 1) must be changed to
new_ctor.


-- 

bonzini at gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |bonzini at gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-05-09 18:09:03         |2009-05-11 07:02:26
               date|                            |


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


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

* [Bug middle-end/40026] [4.5 Regression] ICE during gimplify_init_constructor
  2009-05-05 15:05 [Bug middle-end/40026] New: [4.5 Regression] ICE during gimplify_init_constructor rguenth at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2009-05-11  7:02 ` bonzini at gnu dot org
@ 2009-05-11  9:04 ` bonzini at gnu dot org
  2009-05-11 16:06 ` bonzini at gcc dot gnu dot org
  2009-05-21 10:29 ` rguenth at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: bonzini at gnu dot org @ 2009-05-11  9:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from bonzini at gnu dot org  2009-05-11 09:04 -------
Created an attachment (id=17850)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17850&action=view)
patch to fix the bug


-- 


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


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

* [Bug middle-end/40026] [4.5 Regression] ICE during gimplify_init_constructor
  2009-05-05 15:05 [Bug middle-end/40026] New: [4.5 Regression] ICE during gimplify_init_constructor rguenth at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2009-05-11  9:04 ` bonzini at gnu dot org
@ 2009-05-11 16:06 ` bonzini at gcc dot gnu dot org
  2009-05-21 10:29 ` rguenth at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2009-05-11 16:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from bonzini at gnu dot org  2009-05-11 16:06 -------
Subject: Bug 40026

Author: bonzini
Date: Mon May 11 16:05:45 2009
New Revision: 147386

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147386
Log:
2009-05-11  Paolo Bonzini  <bonzini@gnu.org>

        PR tree-optimization/40026
        * gimplify.c (gimplify_init_constructor): Change initial conditional
        to assertion.  Rewrite TREE_OPERAND (*expr_p, 1) after
        optimize_compound_literals_in_ctor.

testsuite:
2009-05-11  Paolo Bonzini  <bonzini@gnu.org>

        * gcc.c-torture/compile/pr40026.c: New testcase.


Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr40026.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/gimplify.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug middle-end/40026] [4.5 Regression] ICE during gimplify_init_constructor
  2009-05-05 15:05 [Bug middle-end/40026] New: [4.5 Regression] ICE during gimplify_init_constructor rguenth at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2009-05-11 16:06 ` bonzini at gcc dot gnu dot org
@ 2009-05-21 10:29 ` rguenth at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-05-21 10:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from rguenth at gcc dot gnu dot org  2009-05-21 10:29 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2009-05-21 10:29 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-05 15:05 [Bug middle-end/40026] New: [4.5 Regression] ICE during gimplify_init_constructor rguenth at gcc dot gnu dot org
2009-05-05 15:12 ` [Bug c/40026] " rguenth at gcc dot gnu dot org
2009-05-05 15:54 ` mmitchel at gcc dot gnu dot org
2009-05-06 11:09 ` joseph at codesourcery dot com
2009-05-06 11:42 ` rguenther at suse dot de
2009-05-09 18:09 ` [Bug middle-end/40026] " jsm28 at gcc dot gnu dot org
2009-05-11  7:02 ` bonzini at gnu dot org
2009-05-11  9:04 ` bonzini at gnu dot org
2009-05-11 16:06 ` bonzini at gcc dot gnu dot org
2009-05-21 10:29 ` rguenth at gcc dot gnu dot 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).