OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [const6.C] - Rev 693

Compare with Previous | Blame | View Log

// PR target/39179
// Make sure that we don't optimize away the load from K::k.
// { dg-options "-O2" }
// { dg-final { scan-assembler _ZN1K1kE } }

struct K {
    static const unsigned k;
};
extern "C" void abort (void);
int main() {
    if ( K::k != 1 )
      abort ();
    return 1;
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.