public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/22530] New: [4.1 Regression] ICE with static promotion
@ 2005-07-17 19:13 pinskia at gcc dot gnu dot org
  2005-07-17 19:17 ` [Bug tree-optimization/22530] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-17 19:13 UTC (permalink / raw)
  To: gcc-bugs

Compile the following valid C99 code at -O3 and we get an ICE:
struct f1
{
  int i;
};
void g(int);
static struct f1 *f2 = &(struct f1){1};
int f(void)
{
  g(f2->i);
  return f2->i;
}

-- 
           Summary: [4.1 Regression] ICE with static promotion
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: dberlin at gcc dot gnu dot org,gcc-bugs at gcc dot gnu
                    dot org


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


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

* [Bug tree-optimization/22530] [4.1 Regression] ICE with static promotion
  2005-07-17 19:13 [Bug tree-optimization/22530] New: [4.1 Regression] ICE with static promotion pinskia at gcc dot gnu dot org
@ 2005-07-17 19:17 ` pinskia at gcc dot gnu dot org
  2005-07-17 19:18 ` dberlin at dberlin dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-17 19:17 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.1.0


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


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

* [Bug tree-optimization/22530] [4.1 Regression] ICE with static promotion
  2005-07-17 19:13 [Bug tree-optimization/22530] New: [4.1 Regression] ICE with static promotion pinskia at gcc dot gnu dot org
  2005-07-17 19:17 ` [Bug tree-optimization/22530] " pinskia at gcc dot gnu dot org
@ 2005-07-17 19:18 ` dberlin at dberlin dot org
  2005-07-17 19:28 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dberlin at dberlin dot org @ 2005-07-17 19:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dberlin at gcc dot gnu dot org  2005-07-17 19:17 -------
Subject: Re:  New: [4.1 Regression] ICE with
	static promotion

On Sun, 2005-07-17 at 19:13 +0000, pinskia at gcc dot gnu dot org wrote:
> Compile the following valid C99 code at -O3 and we get an ICE:
> struct f1
> {
>   int i;
> };
> void g(int);
> static struct f1 *f2 = &(struct f1){1};
> int f(void)
> {
>   g(f2->i);
>   return f2->i;
> }
> 

The gimplifier needs to split this into a new static temporary, there's
no way we can do something sane with ADDR_EXPR <CONSTRUCTOR>.

Please copy jason or diego :)

(and Kenny, since this is his pass)



-- 


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


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

* [Bug tree-optimization/22530] [4.1 Regression] ICE with static promotion
  2005-07-17 19:13 [Bug tree-optimization/22530] New: [4.1 Regression] ICE with static promotion pinskia at gcc dot gnu dot org
  2005-07-17 19:17 ` [Bug tree-optimization/22530] " pinskia at gcc dot gnu dot org
  2005-07-17 19:18 ` dberlin at dberlin dot org
@ 2005-07-17 19:28 ` pinskia at gcc dot gnu dot org
  2005-07-17 19:45 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-17 19:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-17 19:18 -------
Forgot to say the ICE for this testcase is:
 unhandled expression in get_expr_operands():
 <compound_literal_expr 0x41ebaf80
    type <record_type 0x41eaed20 f1 type_0 SI
        size <integer_cst 0x41e11740 constant invariant 32>
        unit size <integer_cst 0x41e11400 constant invariant 4>
        align 32 symtab 0 alias set 3
        fields <field_decl 0x41eaed90 i type <integer_type 0x41e0f460 int>
            SI file t.c line 3 size <integer_cst 0x41e11740 32> unit size <integer_cst 0x41e11400 4>
            align 32 offset_align 128
            offset <integer_cst 0x41e11420 constant invariant 0>
            bit offset <integer_cst 0x41e11ea0 constant invariant 0> context <record_type 0x41eaed20 
f1>> context <translation_unit_decl 0x41e20a00 D.1171>
        pointer_to_this <pointer_type 0x41eaeee0> chain <type_decl 0x41e20980 D.1159>>
    side-effects addressable
    arg 0 <decl_expr 0x41ebafa0
        type <void_type 0x41e0fbd0 void VOID
            align 8 symtab 0 alias set -1
            pointer_to_this <pointer_type 0x41e0fc40>>
        side-effects
        arg 0 <var_decl 0x41eb7000 __compound_literal.0 type <record_type 0x41eaed20 f1>
            used static ignored SI file t.c line 9 size <integer_cst 0x41e11740 32> unit size <integer_cst 
0x41e11400 4>
            align 32 initial <constructor 0x41eb6c80>>
        t.c:9>>

-- 


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


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

* [Bug tree-optimization/22530] [4.1 Regression] ICE with static promotion
  2005-07-17 19:13 [Bug tree-optimization/22530] New: [4.1 Regression] ICE with static promotion pinskia at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-07-17 19:28 ` pinskia at gcc dot gnu dot org
@ 2005-07-17 19:45 ` pinskia at gcc dot gnu dot org
  2005-07-17 23:06 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-17 19:45 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu dot
                   |                            |org, dnovillo at gcc dot gnu
                   |                            |dot org


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


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

* [Bug tree-optimization/22530] [4.1 Regression] ICE with static promotion
  2005-07-17 19:13 [Bug tree-optimization/22530] New: [4.1 Regression] ICE with static promotion pinskia at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-07-17 19:45 ` pinskia at gcc dot gnu dot org
@ 2005-07-17 23:06 ` pinskia at gcc dot gnu dot org
  2005-07-19 19:58 ` pinskia at gcc dot gnu dot org
  2005-07-19 20:55 ` zadeck at naturalbridge dot com
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-17 23:06 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zadeck at naturalbridge dot
                   |                            |com


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


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

* [Bug tree-optimization/22530] [4.1 Regression] ICE with static promotion
  2005-07-17 19:13 [Bug tree-optimization/22530] New: [4.1 Regression] ICE with static promotion pinskia at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-07-17 23:06 ` pinskia at gcc dot gnu dot org
@ 2005-07-19 19:58 ` pinskia at gcc dot gnu dot org
  2005-07-19 20:55 ` zadeck at naturalbridge dot com
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-19 19:58 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-19 19:57 -------
Fixed removing promot-statics by:
2005-07-19  Danny Berlin <dberlin@dberlin.org>
            Kenneth Zadeck <zadeck@naturalbridge.com>

        * Makefile.in: Removed tree-promote-statics.c
        * tree-promote-statics.c: Removed.
        * common.opt: Removed flag-promote-statics.
        * opts.c: Ditto.
        * passes.c: Removed tree-promote-statics pass.
        * tree-pass.h: Ditto.
        * timevar.def: Removed TV_PROMOTE_STATICS.


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


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


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

* [Bug tree-optimization/22530] [4.1 Regression] ICE with static promotion
  2005-07-17 19:13 [Bug tree-optimization/22530] New: [4.1 Regression] ICE with static promotion pinskia at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-07-19 19:58 ` pinskia at gcc dot gnu dot org
@ 2005-07-19 20:55 ` zadeck at naturalbridge dot com
  6 siblings, 0 replies; 8+ messages in thread
From: zadeck at naturalbridge dot com @ 2005-07-19 20:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From zadeck at naturalbridge dot com  2005-07-19 20:39 -------
While it is true that this problem will go away because I removed the pass,
there still seemed to be the feeling that the reason that this was iced was that
this was goofy gimple and that that goofy gimple needed to be corrected.

-- 


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


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

end of thread, other threads:[~2005-07-19 20:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-17 19:13 [Bug tree-optimization/22530] New: [4.1 Regression] ICE with static promotion pinskia at gcc dot gnu dot org
2005-07-17 19:17 ` [Bug tree-optimization/22530] " pinskia at gcc dot gnu dot org
2005-07-17 19:18 ` dberlin at dberlin dot org
2005-07-17 19:28 ` pinskia at gcc dot gnu dot org
2005-07-17 19:45 ` pinskia at gcc dot gnu dot org
2005-07-17 23:06 ` pinskia at gcc dot gnu dot org
2005-07-19 19:58 ` pinskia at gcc dot gnu dot org
2005-07-19 20:55 ` zadeck at naturalbridge dot com

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).