Article View: gnu.gcc.bug
Article #2318Re: bug in switch (constant)
From: Piet van Oostrum
Date: Thu, 16 Feb 1989 17:23
Date: Thu, 16 Feb 1989 17:23
30 lines
1435 bytes
1435 bytes
In article <1141@ruuinf.UUCP>, piet@ruuinf (Piet van Oostrum) writes: `GCC version 1.32 generates wrong code for a switch with a constant `expression. The error is a reversed test in stmt.c: ------------------------------------------------------------------------ *** stmt.c.~1~ Tue Jan 17 13:52:25 1989 --- stmt.c Thu Feb 16 18:19:47 1989 *************** *** 2296,2302 && ! tree_int_cst_lt (n->high, index_expr)) break; } ! if (n) emit_jump (default_label); else emit_jump (label_rtx (n->code_label)); --- 2296,2302 ----- && ! tree_int_cst_lt (n->high, index_expr)) break; } ! if (!n) emit_jump (default_label); else emit_jump (label_rtx (n->code_label)); -- Piet van Oostrum, Dept of Computer Science, University of Utrecht Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands Telephone: +31-30-531806. piet@cs.ruu.nl (mcvax!hp4nl!ruuinf!piet)
Technical Details
Message-ID:
<1142@ruuinf.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!mcvax!hp4nl!ruuinf!pietReferences:
<1141@ruuinf.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!mcvax!hp4nl!ruuinf!piet From: piet@ruuinf (Piet van Oostrum) Newsgroups: gnu.gcc.bug Subject: Re: bug in switch (constant) Message-ID: <1142@ruuinf.UUCP> Date: 16 Feb 89 17:23:54 GMT References: <1141@ruuinf.UUCP> Sender: piet@ruuinf.UUCP Reply-To: piet@ruuinf (Piet van Oostrum) Organization: Dept of Computer Science, University of Utrecht, Holland Lines: 30 In-reply-to: piet@ruuinf (Piet van Oostrum)