3 pending patches from 2002
Eric Botcazou
ebotcazou@libertysurf.fr
Tue Jan 7 11:48:00 GMT 2003
> > PR c/8032:
> > http://gcc.gnu.org/ml/gcc-patches/2002-11/msg01636.html
> > Probably not worth applying on the 3.2 branch.
>
> Does this work if the constructor is skipping around a lot, e.g.:
>
> struct S { int a; int b; int c; int d; };
>
> struct S s = { .c = 3, .a = 7, 6 };
>
> I don't remember what the "6" is supposed to initialize (b? d?), but
> we should make sure your patch does the right thing.
Ok, I'm going to more thoroughly test this stuff, before and after my patch.
> > PR inline-asm/8832: (former optimization/8832):
> > http://gcc.gnu.org/ml/gcc-patches/2002-12/msg00721.html
> > Same thing.
>
> OK for all affected branches.
(Sorry if you have already considered it) I'd like to have some comments on
the testcase:
/* PR inline-asm/8832 */
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* Verify that GCC doesn't optimize
old style asm instructions. */
void foo(int v)
{
if (v)
asm ("dummy1");
asm ("dummy2");
if (v)
asm ("dummy3");
}
/* { dg-final { scan-assembler "L2" } } */
gcc-3.2.2 optimizes away the dummy1 and dummy2 statements, while gcc-3.3 and
gcc-3.4 include the dummy2 statement in the "if (v)" test. So it is sufficient
to test that we have two reachable labels, hence the assembly scan for "L2".
Is that robust ? If no, how should I write the testcase ?
--
Eric Botcazou
More information about the Gcc-patches
mailing list