Bug 6860 - [3.3/3.4 regression] [arm-thumb] ICE in pre_insert_copy_insn
Summary: [3.3/3.4 regression] [arm-thumb] ICE in pre_insert_copy_insn
Status: RESOLVED DUPLICATE of bug 10467
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 3.1
: P1 critical
Target Milestone: 3.3.1
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2002-05-29 12:46 UTC by dwelch
Modified: 2004-01-17 04:22 UTC (History)
3 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: arm-thumb-elf
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2003-06-04 00:48:43


Attachments
bug.txt (5.95 KB, application/octet-stream)
2003-05-21 15:17 UTC, dwelch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dwelch 2002-05-29 12:46:01 UTC
Compiled source that has worked on previous 2.95.x and 3.0.x
versions

Release:
gcc-core-3.1

Environment:
Slackware 8 based Linux  2.2.19

How-To-Repeat:
description in attachment
Comment 1 Richard Earnshaw 2003-01-31 15:15:57 UTC
State-Changed-From-To: open->analyzed
State-Changed-Why: pre_insert_copy_insn expects a single_set insn, but is being given a parallel with multiple sets.  This is clearly an internal logic failure somewhere in GCSE.
Comment 2 dwelch 2003-03-31 22:19:05 UTC
From: David Welch <dwelch@dwelch.com>
To: dwelch@zianet.com,gcc-gnats@gcc.gnu.org,gcc-bugs@gcc.gnu.org,
 nobody@gcc.gnu.org,gcc-prs@gcc.gnu.org
Cc:  
Subject: Re: optimization/6860: [3.2/3.3/3.4 regression] [arm-thumb]
  pre_insert_copy_insn
Date: Mon, 31 Mar 2003 22:19:05 -0700

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl
 
 
 This bug can be minimized to the following code (didnt try very hard to get 
 this far, perhaps it could
 be minimized further).
 
 if you uncomment the #ifdef NOSTRUCTASSIGN block you will get the error, 
 leave it commented and at least this portion of code does not cause a 
 pre_insert_copy_insn error...
 
 David
 
 
 
 
 #include <stdio.h>
 //#include "dhry.h"
 
   /*
 #ifdef  NOSTRUCTASSIGN
 #define structassign(d, s)      memcpy(&(d), &(s), sizeof(d))
 #else
 #define structassign(d, s)      d = s
 #endif
     */
 
 #ifdef  NOENUM
 #define Ident_1 0
 #define Ident_2 1
 #define Ident_3 2
 #define Ident_4 3
 #define Ident_5 4
    typedef int   Enumeration;
 #else
    typedef       enum    {Ident_1, Ident_2, Ident_3, Ident_4, Ident_5}
                  Enumeration;
 #endif
 
 
 typedef struct record
      {
      struct record *Ptr_Comp;
      Enumeration    Discr;
      union {
            struct {
                    Enumeration Enum_Comp;
                    int         Int_Comp;
                    char        Str_Comp [31];
                    } var_1;
            struct {
                    Enumeration E_Comp_2;
                    char        Str_2_Comp [31];
                    } var_2;
            struct {
                    char        Ch_1_Comp;
                    char        Ch_2_Comp;
                    } var_3;
            } variant;
        } Rec_Type, *Rec_Pointer;
 
 
 
 Rec_Pointer     Ptr_Glob;
 
 Enumeration     Func_1 ();
 
 #ifndef ROPT
 #define REG
          /* REG becomes defined as empty */
          /* i.e. no register variables   */
 #else
 #define REG register
 #endif
 
 
 
 Proc_1 (Ptr_Val_Par)
 /******************/
 
 REG Rec_Pointer Ptr_Val_Par;
      /* executed once */
 {
    REG Rec_Pointer Next_Record = Ptr_Val_Par->Ptr_Comp;
                                          /* == Ptr_Glob_Next */
    /* Local variable, initialized with Ptr_Val_Par->Ptr_Comp,    */
    /* corresponds to "rename" in Ada, "with" in Pascal           */
 
    structassign (*Ptr_Val_Par->Ptr_Comp, *Ptr_Glob);
    Ptr_Val_Par->variant.var_1.Int_Comp = 5;
    Next_Record->variant.var_1.Int_Comp
          = Ptr_Val_Par->variant.var_1.Int_Comp;
    Next_Record->Ptr_Comp = Ptr_Val_Par->Ptr_Comp;
    Proc_3 (&Next_Record->Ptr_Comp);
      /* Ptr_Val_Par->Ptr_Comp->Ptr_Comp
                          == Ptr_Glob->Ptr_Comp */
    if (Next_Record->Discr == Ident_1)
      /* then, executed */
    {
      Next_Record->variant.var_1.Int_Comp = 6;
      Proc_6 (Ptr_Val_Par->variant.var_1.Enum_Comp,
             &Next_Record->variant.var_1.Enum_Comp);
      Next_Record->Ptr_Comp = Ptr_Glob->Ptr_Comp;
      Proc_7 (Next_Record->variant.var_1.Int_Comp, 10,
             &Next_Record->variant.var_1.Int_Comp);
    }
    else /* not executed */
      structassign (*Ptr_Val_Par, *Ptr_Val_Par->Ptr_Comp);
 } /* Proc_1 */
Comment 3 Dara Hazeghi 2003-06-04 00:48:43 UTC
Confirmed still present with gcc 3.2.3, 3.3 branch and mainline (20030602).
Comment 4 Dara Hazeghi 2003-07-09 21:47:41 UTC
Duplicate of 10467 which has a reduced testcase.

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