From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Hayes To: law@cygnus.com Cc: Michael Hayes , egcs@cygnus.com Subject: Re: Ternary operator in loop condition Date: Sun, 31 Jan 1999 23:58:00 -0000 Message-id: <13977.33688.460065.141289@ongaonga.elec.canterbury.ac.nz> References: <13976.30162.513083.611567"@ongaonga.elec.canterbury.ac.nz> <18943.916017460@hurl.cygnus.com> X-SW-Source: 1999-01n/msg00329.html > It may be something that could be caught by gcse/pre once alias analysis is > tied into that pass. How about a case where there is no aliasing. What mods are required for the gcse/pre pass to hoist "(bar ? 4 : 8)" from the loop in the following example? static char fred[100]; void foo(bar) int bar; { int i; for (i = 0; i < (bar ? 4 : 8); i++) fred[i] = 0; } Michael.