pro64-support
[Top] [All Lists]

front-end bug?

To: pro64-support@xxxxxxxxxxx
Subject: front-end bug?
From: David Goodwin <goodwin@xxxxxxxxxxxxx>
Date: Mon, 23 Oct 2000 12:07:39 -0700 (PDT)
Cc: goodwin@xxxxxxxxxxxxx
Reply-to: goodwin@xxxxxxxxxxxxx
Sender: owner-pro64-support@xxxxxxxxxxx
Using the latest pro64 compiler (in nue). This function produces the
included whirl. The front-end incorrectly determines the condition is
always false...


#include <stdio.h>

void mask (int x, int y)
{
  if (((x << 3) & 64) == 1)
    fprintf(stderr, "n12\n");
}



 LOC 1 3 void mask (int x, int y)
 LOC 1 4 {
FUNC_ENTRY <1,37,mask>
 IDNAME 0 <2,1,x>
 IDNAME 0 <2,2,y>
BODY
 BLOCK
 END_BLOCK
 BLOCK
 END_BLOCK
 BLOCK
 PRAGMA 0 120 <null-st> 0 (0x0) # PREAMBLE_END
 LOC 1 5   if (((x << 3) & 64) == 1)
 IF
  I4INTCONST 0 (0x0)
 THEN
  BLOCK
 LOC 1 6     fprintf(stderr, "n12\n");
    U8U8LDID 0 <1,39,stderr> T<34,anon_ptr.,8>
   U8PARM 2 T<34,anon_ptr.,8> #  by_value 
    U8LDA 0 <1,40,(5_bytes)_"n12\n\000"> T<49,anon_ptr.,8>
   U8PARM 2 T<28,anon_ptr.,8> #  by_value 
  VCALL 126 <1,38,fprintf> # flags 0x7e
  END_BLOCK
 ELSE
 LOC 1 5
  BLOCK
  END_BLOCK
 END_IF
 RETURN
 END_BLOCK

<Prev in Thread] Current Thread [Next in Thread>