public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/43562]  New: GCC ICE on optimize attribute
@ 2010-03-29  3:38 jiez at gcc dot gnu dot org
  2010-03-29  3:40 ` [Bug middle-end/43562] " jiez at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: jiez at gcc dot gnu dot org @ 2010-03-29  3:38 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 823 bytes --]

GCC ICE on the attached test case.

$ ./cc1 /tmp/t.c
 bak
Analyzing compilation unit
Performing interprocedural optimizations
 <visibility> <*free_lang_data> <early_local_cleanups> <whole-program>
<inline>Assembling functions:
 bak
/tmp/t.c: In function ‘bak’:
/tmp/t.c:17:1: 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.


-- 
           Summary: GCC ICE on optimize attribute
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jiez at gcc dot gnu dot org


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


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

* [Bug middle-end/43562] GCC ICE on optimize attribute
  2010-03-29  3:38 [Bug middle-end/43562] New: GCC ICE on optimize attribute jiez at gcc dot gnu dot org
@ 2010-03-29  3:40 ` jiez at gcc dot gnu dot org
  2010-03-30  4:07 ` [Bug other/43562] " jiez at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: jiez at gcc dot gnu dot org @ 2010-03-29  3:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jiez at gcc dot gnu dot org  2010-03-29 03:39 -------
Created an attachment (id=20243)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20243&action=view)
The test case


-- 


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


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

* [Bug other/43562] GCC ICE on optimize attribute
  2010-03-29  3:38 [Bug middle-end/43562] New: GCC ICE on optimize attribute jiez at gcc dot gnu dot org
  2010-03-29  3:40 ` [Bug middle-end/43562] " jiez at gcc dot gnu dot org
@ 2010-03-30  4:07 ` jiez at gcc dot gnu dot org
  2010-03-31  2:44 ` jiez at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: jiez at gcc dot gnu dot org @ 2010-03-30  4:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jiez at gcc dot gnu dot org  2010-03-30 04:06 -------
A new patch is here:

http://gcc.gnu.org/ml/gcc-patches/2010-03/msg01375.html


-- 


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


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

* [Bug other/43562] GCC ICE on optimize attribute
  2010-03-29  3:38 [Bug middle-end/43562] New: GCC ICE on optimize attribute jiez at gcc dot gnu dot org
  2010-03-29  3:40 ` [Bug middle-end/43562] " jiez at gcc dot gnu dot org
  2010-03-30  4:07 ` [Bug other/43562] " jiez at gcc dot gnu dot org
@ 2010-03-31  2:44 ` jiez at gcc dot gnu dot org
  2010-03-31  2:52 ` jiez at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: jiez at gcc dot gnu dot org @ 2010-03-31  2:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jiez at gcc dot gnu dot org  2010-03-31 02:44 -------
Subject: Bug 43562

Author: jiez
Date: Wed Mar 31 02:44:10 2010
New Revision: 157849

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157849
Log:
        PR 43562
        * reload.h (caller_save_initialized_p): Declare.
        * toplev.c (backend_init_target): Don't call
        init_caller_save but set caller_save_initialized_p
        to false.
        * caller-save.c (caller_save_initialized_p): Define.
        (init_caller_save): Check caller_save_initialized_p.
        * ira.c (ira): Call init_caller_save if flag_caller_saves.

        testsuite/
        PR 43562
        * gcc.dg/pr43562.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr43562.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/caller-save.c
    trunk/gcc/ira.c
    trunk/gcc/reload.h
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/toplev.c


-- 


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


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

* [Bug other/43562] GCC ICE on optimize attribute
  2010-03-29  3:38 [Bug middle-end/43562] New: GCC ICE on optimize attribute jiez at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2010-03-31  2:44 ` jiez at gcc dot gnu dot org
@ 2010-03-31  2:52 ` jiez at gcc dot gnu dot org
  2010-03-31  2:54 ` jiez at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: jiez at gcc dot gnu dot org @ 2010-03-31  2:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jiez at gcc dot gnu dot org  2010-03-31 02:51 -------
Subject: Bug 43562

Author: jiez
Date: Wed Mar 31 02:51:31 2010
New Revision: 157850

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157850
Log:
        PR 43562
        * reload.h (caller_save_initialized_p): Declare.
        * toplev.c (backend_init_target): Don't call
        init_caller_save but set caller_save_initialized_p
        to false.
        * caller-save.c (caller_save_initialized_p): Define.
        (init_caller_save): Check caller_save_initialized_p.
        * ira.c (ira): Call init_caller_save if flag_caller_saves.

        testsuite/
        PR 43562
        * gcc.dg/pr43562.c: New test.

Added:
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/pr43562.c
Modified:
    branches/gcc-4_4-branch/gcc/ChangeLog
    branches/gcc-4_4-branch/gcc/caller-save.c
    branches/gcc-4_4-branch/gcc/ira.c
    branches/gcc-4_4-branch/gcc/reload.h
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_4-branch/gcc/toplev.c


-- 


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


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

* [Bug other/43562] GCC ICE on optimize attribute
  2010-03-29  3:38 [Bug middle-end/43562] New: GCC ICE on optimize attribute jiez at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2010-03-31  2:52 ` jiez at gcc dot gnu dot org
@ 2010-03-31  2:54 ` jiez at gcc dot gnu dot org
  2010-04-19  7:03 ` jakub at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 11+ messages in thread
From: jiez at gcc dot gnu dot org @ 2010-03-31  2:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from jiez at gcc dot gnu dot org  2010-03-31 02:54 -------
Should be fixed now on trunk and 4.4 branch.


-- 

jiez at gcc dot gnu dot org changed:

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


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


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

* [Bug other/43562] GCC ICE on optimize attribute
  2010-03-29  3:38 [Bug middle-end/43562] New: GCC ICE on optimize attribute jiez at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2010-03-31  2:54 ` jiez at gcc dot gnu dot org
@ 2010-04-19  7:03 ` jakub at gcc dot gnu dot org
  2010-04-19 19:11   ` Andrew Pinski
  2010-04-19  7:04 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 1 reply; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-04-19  7:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jakub at gcc dot gnu dot org  2010-04-19 07:02 -------
This change broke building wine on x86-64.  Distilled testcase:
__attribute__ ((ms_abi)) fn2 (int, int);
struct S { int s; };
struct T { int t; struct S *u; };

void
foo (struct T *x, void *y)
{
  int a, b, c, d;
  fn1 (0, &a, &b, &c, &d);
  x->u[x->t].s = fn2 (fn3 (), a);
  fn1 (y, &a, &b, &c, &d);
}

__attribute__ ((ms_abi)) void
bar (int x)
{
}

void
baz (int x)
{
}

now ICEs at -O2 on x86_64-linux with:
wineice.i: In function 'foo':
wineice.i:12: internal compiler error: in insert_save, at caller-save.c:1171
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Apparently setup_save_areas
                  saved_reg->slot     
                    = assign_stack_local_1
                      (regno_save_mode[regno][1],
                       GET_MODE_SIZE (regno_save_mode[regno][1]), 0, true);
creates a slot where regno_save_mode[regno][1] for regno 4 is VOIDmode, and the
VOIDmode MEM which has MEM_ALIGN 0 then confuses everything.


-- 

jakub at gcc dot gnu dot org changed:

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


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


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

* [Bug other/43562] GCC ICE on optimize attribute
  2010-03-29  3:38 [Bug middle-end/43562] New: GCC ICE on optimize attribute jiez at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2010-04-19  7:03 ` jakub at gcc dot gnu dot org
@ 2010-04-19  7:04 ` jakub at gcc dot gnu dot org
  2010-04-19  7:07 ` jakub at gcc dot gnu dot org
  2010-04-19 19:11 ` pinskia at gmail dot com
  8 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-04-19  7:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from jakub at gcc dot gnu dot org  2010-04-19 07:03 -------
Forgot to say this is on the 4.4 branch.


-- 


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


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

* [Bug other/43562] GCC ICE on optimize attribute
  2010-03-29  3:38 [Bug middle-end/43562] New: GCC ICE on optimize attribute jiez at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2010-04-19  7:04 ` jakub at gcc dot gnu dot org
@ 2010-04-19  7:07 ` jakub at gcc dot gnu dot org
  2010-04-19 19:11 ` pinskia at gmail dot com
  8 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-04-19  7:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from jakub at gcc dot gnu dot org  2010-04-19 07:07 -------
Ah, that is PR43662.


-- 

jakub at gcc dot gnu dot org changed:

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


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


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

* [Bug other/43562] GCC ICE on optimize attribute
  2010-03-29  3:38 [Bug middle-end/43562] New: GCC ICE on optimize attribute jiez at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2010-04-19  7:07 ` jakub at gcc dot gnu dot org
@ 2010-04-19 19:11 ` pinskia at gmail dot com
  8 siblings, 0 replies; 11+ messages in thread
From: pinskia at gmail dot com @ 2010-04-19 19:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from pinskia at gmail dot com  2010-04-19 19:11 -------
Subject: Re:  GCC ICE on optimize attribute



Sent from my iPhone

On Apr 19, 2010, at 12:02 AM, "jakub at gcc dot gnu dot org"
<gcc-bugzilla@gcc.gnu.org 
 > wrote:

>
>
> ------- Comment #11 from jakub at gcc dot gnu dot org  2010-04-19  
> 07:02 -------
> This change broke building wine on x86-64.


There was already a bug filed for this and a patch was committed today  
or yesterday to the trunk to fix this ice.



> Distilled testcase:
> __attribute__ ((ms_abi)) fn2 (int, int);
> struct S { int s; };
> struct T { int t; struct S *u; };
>
> void
> foo (struct T *x, void *y)
> {
>  int a, b, c, d;
>  fn1 (0, &a, &b, &c, &d);
>  x->u[x->t].s = fn2 (fn3 (), a);
>  fn1 (y, &a, &b, &c, &d);
> }
>
> __attribute__ ((ms_abi)) void
> bar (int x)
> {
> }
>
> void
> baz (int x)
> {
> }
>
> now ICEs at -O2 on x86_64-linux with:
> wineice.i: In function 'foo':
> wineice.i:12: internal compiler error: in insert_save, at caller- 
> save.c:1171
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.
>
> Apparently setup_save_areas
>                  saved_reg->slot
>                    = assign_stack_local_1
>                      (regno_save_mode[regno][1],
>                       GET_MODE_SIZE (regno_save_mode[regno][1]), 0,  
> true);
> creates a slot where regno_save_mode[regno][1] for regno 4 is  
> VOIDmode, and the
> VOIDmode MEM which has MEM_ALIGN 0 then confuses everything.
>
>
> -- 
>
> jakub at gcc dot gnu dot org changed:
>
>           What    |Removed                     |Added
> --- 
> --- 
> ----------------------------------------------------------------------
>             Status|RESOLVED                    |UNCONFIRMED
>         Resolution|FIXED                       |
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43562
>


-- 


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


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

* Re: [Bug other/43562] GCC ICE on optimize attribute
  2010-04-19  7:03 ` jakub at gcc dot gnu dot org
@ 2010-04-19 19:11   ` Andrew Pinski
  0 siblings, 0 replies; 11+ messages in thread
From: Andrew Pinski @ 2010-04-19 19:11 UTC (permalink / raw)
  To: gcc-bugzilla; +Cc: gcc-bugs



Sent from my iPhone

On Apr 19, 2010, at 12:02 AM, "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org 
 > wrote:

>
>
> ------- Comment #11 from jakub at gcc dot gnu dot org  2010-04-19  
> 07:02 -------
> This change broke building wine on x86-64.


There was already a bug filed for this and a patch was committed today  
or yesterday to the trunk to fix this ice.



> Distilled testcase:
> __attribute__ ((ms_abi)) fn2 (int, int);
> struct S { int s; };
> struct T { int t; struct S *u; };
>
> void
> foo (struct T *x, void *y)
> {
>  int a, b, c, d;
>  fn1 (0, &a, &b, &c, &d);
>  x->u[x->t].s = fn2 (fn3 (), a);
>  fn1 (y, &a, &b, &c, &d);
> }
>
> __attribute__ ((ms_abi)) void
> bar (int x)
> {
> }
>
> void
> baz (int x)
> {
> }
>
> now ICEs at -O2 on x86_64-linux with:
> wineice.i: In function 'foo':
> wineice.i:12: internal compiler error: in insert_save, at caller- 
> save.c:1171
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.
>
> Apparently setup_save_areas
>                  saved_reg->slot
>                    = assign_stack_local_1
>                      (regno_save_mode[regno][1],
>                       GET_MODE_SIZE (regno_save_mode[regno][1]), 0,  
> true);
> creates a slot where regno_save_mode[regno][1] for regno 4 is  
> VOIDmode, and the
> VOIDmode MEM which has MEM_ALIGN 0 then confuses everything.
>
>
> -- 
>
> jakub at gcc dot gnu dot org changed:
>
>           What    |Removed                     |Added
> --- 
> --- 
> ----------------------------------------------------------------------
>             Status|RESOLVED                    |UNCONFIRMED
>         Resolution|FIXED                       |
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43562
>


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

end of thread, other threads:[~2010-04-19 19:11 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-29  3:38 [Bug middle-end/43562] New: GCC ICE on optimize attribute jiez at gcc dot gnu dot org
2010-03-29  3:40 ` [Bug middle-end/43562] " jiez at gcc dot gnu dot org
2010-03-30  4:07 ` [Bug other/43562] " jiez at gcc dot gnu dot org
2010-03-31  2:44 ` jiez at gcc dot gnu dot org
2010-03-31  2:52 ` jiez at gcc dot gnu dot org
2010-03-31  2:54 ` jiez at gcc dot gnu dot org
2010-04-19  7:03 ` jakub at gcc dot gnu dot org
2010-04-19 19:11   ` Andrew Pinski
2010-04-19  7:04 ` jakub at gcc dot gnu dot org
2010-04-19  7:07 ` jakub at gcc dot gnu dot org
2010-04-19 19:11 ` pinskia at gmail 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).