Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/pr64037.C @ 118:fd00160c1b76
ifdef TARGET_64BIT
author | mir3636 |
---|---|
date | Tue, 27 Feb 2018 15:01:35 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// { dg-do run { target i?86-*-* x86_64-*-* } } // { dg-options "-std=c++11 -Os" } enum class X : unsigned char { V = 2, }; static void __attribute__((noinline,noclone)) foo(unsigned &out, unsigned a, X b) { out = static_cast<unsigned>(b); } int main() { unsigned deadbeef = 0xDEADBEEF; asm volatile ("" : "+d" (deadbeef), "+c" (deadbeef)); unsigned out; foo(out, 2, X::V); if (out != 2) __builtin_abort (); return 0; }