public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/12661] New: [tree-ssa] gimplification failure
@ 2003-10-17 16:37 steven at gcc dot gnu dot org
  2003-10-17 16:38 ` [Bug optimization/12661] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: steven at gcc dot gnu dot org @ 2003-10-17 16:37 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: [tree-ssa] gimplification failure
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: steven at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,jason at gcc dot gnu dot
                    org,jeroen dot dobbelaere at acunia dot com

This snippet is not correctly gimplified:

void
foo (void)
{
  int target_flags;
  if ((target_flags >> 9) & 1)
    {
      if (((target_flags >> 9) & 1) !=
          ((target_flags >> 11) && (target_flags >> 11)))
        return;
    }
}

The (cleaned-up) .t05.gimple dump looks like this.

;; Function foo (foo)
                                                                                
foo ()
{
  int T.1;
  int T.2;
  _Bool T.3;
  int T.4;
  _Bool T.5;
  _Bool T.6;
  int target_flags;
                                                                                
  T.1 = target_flags >> 9;
  T.2 = T.1 & 1;
  T.3 = (_Bool)T.2;
  if (T.3)
    {
      T.1 = target_flags >> 9;
      T.2 = T.1 & 1;
      T.3 = (_Bool)T.2;
      T.4 = target_flags >> 11;
      T.5 = T.4 != 0;
      T.6 = T.3 ^ T.5;
      if (T.6)
        return;
    }
}

Note the "T.5 = T.4 != 0" line.  This causes an ICE in get_expr_operands():

unhandled expression in get_expr_operands():
 <truth_not_expr 0x401b2440
    type <boolean_type 0x4014e740 _Bool unsigned QI
        size <integer_cst 0x4014c138 constant invariant 8>
        unit size <integer_cst 0x4014c150 constant invariant 1>
        align 8 symtab 0 alias set -1 precision 1 min <integer_cst 0x4014c510 0>
max <integer_cst 0x4014c558 1>>
    
    arg 0 <ssa_name 0x401b23c0 type <boolean_type 0x4014e740 _Bool>
       >>
 
 
t.c: In function `foo':
 
t.c:4: internal compiler error: in get_expr_operands, at tree-dfa.c:540

This test case was reduced from simplify-rtx.c for armv5l-unknown-linux-gnu. 
Bootstrap for that target fails because of this bug.


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

end of thread, other threads:[~2003-10-21 15:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-17 16:37 [Bug optimization/12661] New: [tree-ssa] gimplification failure steven at gcc dot gnu dot org
2003-10-17 16:38 ` [Bug optimization/12661] " pinskia at gcc dot gnu dot org
2003-10-17 16:38 ` pinskia at gcc dot gnu dot org
2003-10-17 16:42 ` pinskia at gcc dot gnu dot org
2003-10-17 19:52 ` jason at gcc dot gnu dot org
2003-10-17 19:59 ` jason at gcc dot gnu dot org
2003-10-21 14:52 ` cvs-commit at gcc dot gnu dot org
2003-10-21 15:51 ` pinskia 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).