Bug 27085 - [4.2 regression] ICE in add_virtual_operand
Summary: [4.2 regression] ICE in add_virtual_operand
Status: RESOLVED DUPLICATE of bug 27373
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: 4.2.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2006-04-08 18:55 UTC by Debian GCC Maintainers
Modified: 2006-05-17 16:45 UTC (History)
8 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-05-02 08:02:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Debian GCC Maintainers 2006-04-08 18:55:49 UTC
[ forwarded from http://bugs.debian.org/361441 ]

% cat ice.c 
typedef struct {
    int array_inputs;
} TNLcontext;

void f(void *);

void _tnl_upgrade_client_data (void *swtnl_context) {
    f(&((TNLcontext *) swtnl_context)->array_inputs);
    int is_writeable = 0;
    int *inputs = &((TNLcontext *) swtnl_context)->array_inputs;
    f(&is_writeable);
    *inputs = 0;
}

% gcc -c -O2 ice.c    
ice.c: In function '_tnl_upgrade_client_data':
ice.c:7: internal compiler error: in add_virtual_operand, at tree-ssa-operands.c:1354
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

No problem with 4.1.

    Falk
Comment 1 Debian GCC Maintainers 2006-04-09 10:10:53 UTC
Seems to occur quite frequently, here's another test case:

struct GdkColor {
    unsigned long pixel;
    unsigned short red;
};

struct GtkStyle {
    struct GdkColor bg;
};

struct GtkStyle *gtk_style_new (void);
void pthreada_create(unsigned long *);

void start_synaescope(void) {
    unsigned long synaescope_thread;
    struct GtkStyle *style = gtk_style_new();
    struct GdkColor *color = &style->bg;
    color->red = 0;
    pthreada_create(&synaescope_thread);
}


    Falk
Comment 2 Volker Reichelt 2006-04-10 11:54:10 UTC
Probably related to PR 26626.
Comment 3 Andrew Pinski 2006-04-10 16:35:46 UTC
It is a dup, Daniel asked me yesterday to close it as one but I did not get around to it til today.

*** This bug has been marked as a duplicate of 26626 ***
Comment 4 Andrew Pinski 2006-05-02 08:01:29 UTC
(In reply to comment #1)
> Seems to occur quite frequently, here's another test case:
> 

Can you file that into a different bug?
As it is a different issue.

Actually the orginal testcase here was not fixed by the patch which is going to fix PR 26626 either.
So reopening.
Comment 5 Martin Michlmayr 2006-05-17 12:49:33 UTC
(In reply to comment #4)
> Actually the orginal testcase here was not fixed by the patch which is going to
> fix PR 26626 either.
> So reopening.

Daniel, since you fixed 26626, do you think you could take a look at this one too?

Comment 6 Andrew Pinski 2006-05-17 16:45:06 UTC
Both of the testcases here were fixed by the patch for PR 27373.

*** This bug has been marked as a duplicate of 27373 ***