plateform stringclasses 1
value | repo_name stringclasses 2
values | name stringlengths 1 78 | ext stringclasses 2
values | path stringlengths 15 1.11k | size int64 1 8.55M | source_encoding stringclasses 11
values | md5 stringlengths 32 32 | text stringlengths 0 8.49M |
|---|---|---|---|---|---|---|---|---|
google | chromium | vector12 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/vector12.C | 88 | utf_8 | 173dc80ba2834a9afdc07f599ac08c74 | // PR c++/34917
// { dg-do compile }
const int i __attribute ((vector_size (8))) = {};
|
google | chromium | gnu-inline-template-func | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/gnu-inline-template-func.C | 562 | utf_8 | df8bb001c84f32307c935ddafd4b28e1 | /* { dg-do compile } */
/* { dg-options "-O" } */ // such that static functions are optimized out
/* { dg-final { scan-assembler "func1" } } */
/* { dg-final { scan-assembler "func2" } } */
/* { dg-final { scan-assembler-not "func3" } } */
/* { dg-final { scan-assembler "func4" } } */
/* { dg-final { scan-assembler-not... |
google | chromium | vla1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/vla1.C | 525 | utf_8 | 8d703bcc46788d72b8227a16a1decdf8 | // { dg-do compile }
// Crash tests from PR middle-end/6994. See also gcc.dg/vla-2.c.
// A::A is acceptable extended C++ (VLA types brought over from C99);
// B::B is not, but is closely related to acceptable extended C, though
// not to acceptable C99.
class A { A (int); };
A::A (int i)
{
int ar[1][i]; // { d... |
google | chromium | altivec-3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/altivec-3.C | 3,484 | utf_8 | d3261ef497bef041056bc7661e3a3686 | /* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */
/* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec" } */
/* Test for correct handling of AltiVec constants passed
through '...' (va_arg). */
#include <stda... |
google | chromium | builtin6 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/builtin6.C | 300 | utf_8 | b7c9d67e055f43c68752eb5dee97ef5b | // PR c++/19044
// Verify that alternate asm name for builtin named "foo" also gets
// applied to its sibling "__builtin_foo".
// { dg-do compile }
// { dg-final { scan-assembler "fancy_sin" } }
extern "C" double sin(double) __asm("_fancy_sin");
double foo(double x) { return __builtin_sin(x); }
|
google | chromium | attrib8 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/attrib8.C | 262 | utf_8 | 96c6791e16518bc1891b0b699b2ec487 | // PR 8656
// { dg-do compile { target i?86-*-* x86_64-*-* } }
// { dg-require-effective-target ilp32 }
extern int * (__attribute__((stdcall)) *fooPtr)( void);
int * __attribute__((stdcall)) myFn01( void) { return 0; }
void snafu( void)
{
fooPtr = myFn01;
}
|
google | chromium | anon-struct4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/anon-struct4.C | 157 | utf_8 | 9ab8118751608e965f6bdd1d74306f13 | // PR c++/14401
struct { struct { int& i ; } bar ; } foo ; // { dg-error "uninitialized" "uninit" }
// { dg-warning "anonymous" "anon" { target *-*-* } 3 }
|
google | chromium | va-arg-pack-len-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/va-arg-pack-len-1.C | 2,565 | utf_8 | 5767d28306995682901a8025cc09bcf5 | // { dg-do run }
// { dg-options "-O2" }
#include <stdarg.h>
extern "C" int error_open_missing_mode (void)
__attribute__((__error__ ("open with O_CREAT needs 3 arguments, only 2 were given")));
extern "C" int warn_open_too_many_arguments (void)
__attribute__((__warning__ ("open called with more than 3 arguments")... |
google | chromium | complit7 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/complit7.C | 81 | utf_8 | e710a424682710a7b643aeb0875d892d | // PR c++/27807
// { dg-options "" }
int i = (int()){0}; // { dg-error "type" }
|
google | chromium | label5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/label5.C | 181 | utf_8 | cd2b25de330220dc6703e78dbb48bdee | // { dg-options "" }
// PR c++/24052
struct A { };
int main() { b: A() && && b; } // { dg-error "A\\(\\) && && *b" }
// { dg-message "candidate" "additional" { target *-*-* } 5 }
|
google | chromium | stmtexpr5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/stmtexpr5.C | 156 | utf_8 | a6cc01634e0bd707301c873f2d35f891 | // PR c++/21440
// { dg-options "" }
struct Foo {
~Foo();
int i;
};
void bar() {
Foo foo = ({
Foo bletch;
bletch.i = 0;
bletch;
});
}
|
google | chromium | interface2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/interface2.C | 186 | utf_8 | 869c6cc33c04831bc61047af9a9ac5fc | // PR c++/26195
// { dg-do link }
// { dg-additional-sources "interface2b.cc" }
// { dg-options "-fno-inline" }
#pragma implementation "interface2-imaginary.h"
#include "interface2a.h"
|
google | chromium | has_nothrow_copy-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/has_nothrow_copy-1.C | 1,999 | utf_8 | bebddf14a198be01c01151a6a32442df | // { dg-do "run" }
#include <cassert>
struct A
{
double a;
double b;
};
struct B
{
A a;
};
struct C
: public A { };
struct D
{
D(const D&) throw() { }
};
struct E
{
E(const E&) throw(int) { }
};
struct E1
{
E1(const E1&) throw(int) { throw int(); }
};
struct F
{
F() throw() { }
};
struct G
{
G() throw(i... |
google | chromium | bitfield5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/bitfield5.C | 291 | utf_8 | 5ae84e299d858dd174f54056c4a452d1 | /* { dg-do compile } */
/* { dg-options "-Wno-packed-bitfield-compat" } */
/* { dg-options "-Wno-packed-bitfield-compat -mno-ms-bitfields" { target i?86-*-netware } } */
struct t
{
char a:4;
char b:8 __attribute__ ((packed));
char c:4;
};
int assrt[sizeof (struct t) == 2 ? 1 : -1];
|
google | chromium | typename1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/typename1.C | 303 | utf_8 | a55635b999e217d4900dcb3975178408 | // PR c++/6255
// { dg-options "-fpermissive -w" }
template <class T> struct A { typedef int X; };
template <class T> struct B { typedef A<T> Y; void f (typename Y::X); };
template <class T, class T1, class T2, class T3> struct C : public B<T> { void g (typename B<T>::Y::X); };
template class B<int>;
|
google | chromium | asm11 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/asm11.C | 862 | utf_8 | 25fbbf0ac13b6baebc40ebabaedfe317 | // PR c/37772
// { dg-do compile }
// { dg-options "" }
void
foo ()
{
int i;
asm (); // { dg-error "expected string-literal before" }
asm (1); // { dg-error "expected string-literal before" }
asm (int); // { dg-error "expected string-literal before" }
asm (: "=r" (i)); // { dg-error "expected stri... |
google | chromium | flexary1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/flexary1.C | 435 | utf_8 | c0dc41d4a72302e0ac9ef29725c83d30 | // { dg-do compile }
// PR c++ 11614
typedef int ary_t[];
struct test
{
ary_t *b;
int (*a)[]; // this is not a flexible array member
};
void test(void)
{
struct test s;
int (*a)[] = 0;
ary_t *b = 0;
a = s.a;
a = s.b;
s.a = a;
s.b = a;
b = s.a;
b = s.b;
s.a = b;
s.b = b;
} |
google | chromium | complex1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/complex1.C | 148 | utf_8 | 15f53dad7ebd6c04a3f9232631c7a032 | /* { dg-options "" } */
/* { dg-do compile } */
// Testing if we can do a new of a complex type
// PR C++/28450
void* q = new __complex__ int ();
|
google | chromium | attrib22 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/attrib22.C | 105 | utf_8 | 833f8e3e0d22842c6ce92cb71319b39f | // PR c++/27648
void f()
{
static_cast<float *__attribute((unused))>(0); // { dg-error "expected" }
}
|
google | chromium | utf16-4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/utf16-4.C | 887 | utf_8 | ac5f1f302552d2e9b354d67c0e3a8a40 | /* Expected errors for char16_t character constants. */
/* { dg-do compile } */
/* { dg-options "-std=c++0x" } */
const static char16_t c0 = u''; /* { dg-error "empty character" } */
const static char16_t c1 = u'ab'; /* { dg-warning "constant too long" } */
const static char16_t c2 = u'\U00064321'; /* { dg-warning "c... |
google | chromium | vector1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/vector1.C | 162 | utf_8 | 1e6ab4b0a8dd095b526fad3f97ec5a91 | // PR c++/11895
// This used to ICE in reshape_init.
__attribute__((vector_size(16))) int a1 = { 100, 200, 300, 400 }; |
google | chromium | fpreg1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/fpreg1.C | 3,866 | utf_8 | 60898b718df5cec3ef7222e3b1257e0f | // Test permitted and invalid uses of __fpreg, for C++.
// { dg-do compile { target ia64-*-* } }
// { dg-options "" }
__float80 f80;
double d;
// Default initialized __fpreg is OK.
__fpreg fpreg, fpreg2;
// But explicitly zero-initialized is an invalid conversion.
__fpreg fi = 0; // { dg-error "invalid conversion to '_... |
google | chromium | packed2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/packed2.C | 680 | utf_8 | de5f86b7a10350b9ce405e101438c412 | // PR c++/10091
// Original synopsis
// Bug: We were dying because in general, B::a doesn't have enough
// alignment for us to take its address. But if the B is C::b, it does
// have enough alignment, and we should be able to determine that.
// This only failed on STRICT_ALIGNMENT targets (i.e. not i686)
// July 20... |
google | chromium | always_inline-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/always_inline-1.C | 429 | utf_8 | 644c5b82757cda2bb4ab9658b9dff77a | // { dg-options "-O0" }
// { dg-do compile }
// PR C++/34715
namespace X
{
template <class T>
const T& min(const T& a, const T& b);
template <class T>
inline __attribute__ ((always_inline)) const T& min(const T& a, const T& b)
{
return a < b ? a : b;
}
}
template <class T>
inline __attribute__ ((always_inlin... |
google | chromium | cleanup-5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/cleanup-5.C | 1,292 | utf_8 | 5163d55058f3e9b1c2787f0e8f021dff | /* HP-UX libunwind.so doesn't provide _UA_END_OF_STACK */
/* { dg-do run } */
/* { dg-options "-fexceptions" } */
/* { dg-skip-if "" { "ia64-*-hpux11.*" } { "*" } { "" } } */
/* Verify that cleanups work with exception handling. */
#include <unwind.h>
#include <stdlib.h>
#include <string.h>
static _Unwind_Reason_Co... |
google | chromium | is_base_of_diagnostic | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/is_base_of_diagnostic.C | 142 | utf_8 | 1d02d3da81936dbac4acf7fc5bab3598 | class A
{ };
class B;
union C
{ };
union D;
void f()
{
__is_base_of(A, B); // { dg-error "incomplete type" }
__is_base_of(C, D);
}
|
google | chromium | builtin1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/builtin1.C | 281 | utf_8 | 2688425f4bb09561395ab602acbbe5c1 | // Test whether alternate 'asm' name is applied correctly to
// builtin in global namespace
// { dg-do compile }
// { dg-options "" }
// { dg-final { scan-assembler "fancy_printf" } }
extern "C" int printf(const char*, ...) __asm("_fancy_printf");
void foo() { printf("abc"); }
|
google | chromium | attrib17 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/attrib17.C | 511 | utf_8 | 5ce9613d48cc00994b9fa919e8cc1293 | // { dg-do compile }
// Origin: Benjamin Kosnik <bkoz at gcc dot gnu dot org>
// PR c++/17743: Attributes applied to typedefs.
struct A {
typedef char layout_type[sizeof(double)]
__attribute__((aligned(__alignof__(double))));
layout_type data;
};
struct B {
typedef char layout_type[sizeof(double)];
layout_t... |
google | chromium | vector8 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/vector8.C | 393 | utf_8 | 2eae796d26829372d14224527a39750b | /* { dg-do compile } */
/* { dg-options "" } */
/* Check for application of |, ^, and & on vector types. */
#define vector __attribute__((vector_size(16) ))
vector float a;
vector int a1;
vector float b;
vector int b1;
int f(void)
{
a = a | b; /* { dg-error "" } */
a = a & b; /* { dg-error "" } */
a = a ^ b; ... |
google | chromium | is_polymorphic | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/is_polymorphic.C | 1,280 | utf_8 | cfa9503b4961ef09af7a624c704b0e86 | // { dg-do "run" }
#include <cassert>
#include <exception>
struct A
{
double a;
double b;
};
class B
{
virtual void rotate(int) { }
};
class C
: public B { };
union U
{
double a;
double b;
};
template<typename T>
bool
f()
{ return __is_polymorphic(T); }
template<typename T>
class My
{
public:
... |
google | chromium | altivec-8 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/altivec-8.C | 757 | utf_8 | 683588ba7d8e9b0d8436b68f5b28c8cb | /* { dg-do compile { target powerpc*-*-* } } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* This test case exercises intrinsic/argument combinations that,
while not in the Motorola AltiVec PIM, have nevertheless crept
into the AltiVec vernacular over the years. */
#include <altivec.h>
void foo (v... |
google | chromium | altivec-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/altivec-1.C | 284 | utf_8 | f94bcd708feb1a029065a7503b545f54 | /* { dg-do compile { target powerpc*-*-* } } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec" } */
#include <altivec.h>
int main()
{
return 0;
}
class F32vec4 {
public:
vector float val;
vector float operator++(void) { return val;}
};
|
google | chromium | gnu-inline-namespace | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/gnu-inline-namespace.C | 391 | utf_8 | b4a8192e545a20f5b7dea0d9fb8a6f63 | /* { dg-do compile } */
/* { dg-options "-O" } */ // such that static functions are optimized out
/* { dg-final { scan-assembler "func1" } } */
/* { dg-final { scan-assembler "func2" } } */
/* { dg-final { scan-assembler-not "func3" } } */
/* { dg-final { scan-assembler "func4" } } */
/* { dg-final { scan-assembler-not... |
google | chromium | attrib33 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/attrib33.C | 254 | utf_8 | b4d4dad31de4936353878d38d9bf3387 | // PR c++/35546
// { dg-do compile }
template <int N>
struct T
{
void foo (char const * ...) __attribute__ ((format (printf,2,3)));
};
template struct T<3>;
template <typename T>
struct U
{
typedef T __attribute__((mode (SI))) V;
};
U<int>::V v;
|
google | chromium | altivec-cell-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/altivec-cell-2.C | 2,503 | utf_8 | ee8876bb4c7e26216a124a7d6118d4ed | /* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */
/* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec" } */
/* Test the vec_extract VMX intrinsics. */
#include <altivec.h>
extern "C" void abort (void);
vector ... |
google | chromium | utf-type | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/utf-type.C | 427 | utf_8 | 7a8ffbc3282a1e0c0bf5fe1f463f8c28 | /* Ensure that __CHAR16_TYPE__ and __CHAR32_TYPE__ exist, match the types they
are the underlying data type for. */
/* { dg-do run } */
/* { dg-options "-std=c++0x -Wall -Werror" } */
extern "C" void abort (void);
int main ()
{
if (sizeof (__CHAR16_TYPE__) != sizeof (char16_t))
abort();
if (sizeof (__CHAR32... |
google | chromium | altivec-14 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/altivec-14.C | 352 | utf_8 | 35f5233dc3266b57653c840644e9cbd2 | /* { dg-do compile { target powerpc*-*-* } } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec" } */
void f (__attribute__((altivec (vector__))) signed int * a,
__attribute__((altivec (vector__))) signed int * const b);
int
foo (void)
{
__attribute__((altivec (vector__))) signe... |
google | chromium | tmplattr6 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/tmplattr6.C | 192 | utf_8 | b2cbeefe0b660f19695decd8817dfef1 | // Don't crash on an unknown attribute.
struct foo {
template <class T>
void __attribute__((leafify)) bar() {} // { dg-warning "ignored" }
};
void bar(void)
{
foo f;
f.bar<int>();
}
|
google | chromium | asm6 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/asm6.C | 117 | utf_8 | 0689b61a59bc7c15432dc6d704aebb9f | struct A
{
~A();
};
int foo(A);
void bar()
{
A a;
asm("" : : "r"(foo(a)) );//<-- cleanup needed here.
}
|
google | chromium | label11 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/label11.C | 370 | utf_8 | 416b5c7eddab17750318ee4dec3372e4 | // PR c++/38725
// { dg-do compile }
// { dg-options "" }
struct A {};
struct B : virtual A {};
int vi;
void *vp;
void
f1 (int i)
{
goto *i;
}
void
f2 (B b)
{
goto *b; // { dg-error "cannot convert" }
}
template <typename T>
void
f3 (T i)
{
goto *i;
}
void
f3a ()
{
f3 (vi);
}
template <typename T>
void
f4... |
google | chromium | utf-typedef-cxx98 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/utf-typedef-cxx98.C | 257 | utf_8 | 960c6b9ddd1bdea1576c8861d7d63855 | /* Ensure that a typedef to char16_t/char32_t is fine in c++98. */
/* { dg-do compile } */
/* { dg-options "-std=c++98" } */
typedef short unsigned int char16_t;
typedef unsigned int char32_t; |
google | chromium | attribute-test-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/attribute-test-1.C | 816 | utf_8 | e7f9381db119c9c6ce6e52d04c2a9bd8 | // { dg-do run }
// { dg-options "" }
// PR c++/13989
extern "C" void abort();
#define vector __attribute__((vector_size(16)))
struct Constants {
inline vector unsigned int deadbeef(void) const {
return (vector unsigned int){0xdeadbeef, 0xabababab, 0x55555555, 0x12345678};
};
};
inline vector unsigned int ... |
google | chromium | complit2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/complit2.C | 271 | utf_8 | 7350965e2763a3a6e1d4346deaa1e94e | // PR c++/12726
// { dg-options "" }
struct A
{
A();
A(const A&);
A(int);
};
struct B
{
A a;
};
void foo()
{
B b;
b = (B){0};
} |
google | chromium | asm5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/asm5.C | 759 | utf_8 | e5f9fb7d1c25afe2ab0823f495d251e5 | void f (int i)
{
__asm__("" : );
__asm__("" : "+g" (i));
__asm__("" :: );
__asm__("" :: "g" (i));
__asm__("" : : );
__asm__("" : "+g" (i) : );
__asm__("" : : "g" (i));
__asm__("" : "+g" (i) : "g" (i));
__asm__("" ::: );
__asm__("" ::: "memory");
__asm__("" : :: );
__asm__("" : "+g" (i) :: );
__asm__("... |
google | chromium | bitfield3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/bitfield3.C | 291 | utf_8 | 4f6083c38df859567d6aab1182f8cade | /* { dg-do compile } */
/* { dg-options "-Wno-packed-bitfield-compat" } */
/* { dg-options "-Wno-packed-bitfield-compat -mno-ms-bitfields" { target i?86-*-netware } } */
struct t
{
char a:4;
char b:8;
char c:4;
} __attribute__ ((packed));
int assrt[sizeof (struct t) == 2 ? 1 : -1];
|
google | chromium | java-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/java-2.C | 1,278 | utf_8 | 2484bd8763c28e930db150903973ca92 | // PR c++/30293
// PR c++/30294
// { dg-do compile { target { ! { powerpc-ibm-aix* } } } }
// { dg-options "" }
extern "Java" {
typedef __java_byte jbyte;
namespace java {
namespace lang {
class Object {};
class Class {};
}
}
typedef struct java::lang::Object* jobject;
typedef java::lang::Class *jclass;
}
extern "... |
google | chromium | va-arg-pack-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/va-arg-pack-1.C | 2,664 | utf_8 | 33d19c269a9e9108be7e58ebb9f5dba4 | // __builtin_va_arg_pack () builtin tests.
// { dg-do run }
// { dg-options "-O2" }
#include <stdarg.h>
extern "C" void abort (void);
int v1 = 8;
long int v2 = 3;
void *v3 = (void *) &v2;
struct A { char c[16]; } v4 = { "foo" };
long double v5 = 40;
char seen[20];
int cnt;
__attribute__ ((noinline)) int
foo1 (int x... |
google | chromium | dllexport-MI1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/dllexport-MI1.C | 1,351 | utf_8 | 6aa7306aa2bf445debe3d81c5b253dd4 | // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
// Test that non-virtual MI thunks are exported.
// To build the dll and client app:
// g++ -shared -o MI.dll dllexport-MI1.C
// g++ -o MItest.exe dllimport-MI1.C -L. MI.dll
#define BUILDING_MI_DLL
#include "dll-MI1.h"
MBase::~MBase(){}
int D1::vf() cons... |
google | chromium | va-arg-pack-len-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/va-arg-pack-len-2.C | 1,184 | utf_8 | 3da578ea7fb89ed9d7d870cd2355c8a1 | // { dg-do compile }
// { dg-options "-O2" }
#include <stdarg.h>
extern int error_open_missing_mode (void)
__attribute__((__error__ ("open with O_CREAT needs 3 arguments, only 2 were given")));
extern int warn_open_too_many_arguments (void)
__attribute__((__warning__ ("open called with more than 3 arguments")));
... |
google | chromium | complit10 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/complit10.C | 321 | utf_8 | 3cf8f5d118ccef5a3e2d44a12df39f35 | // PR c++/36023
// { dg-do compile }
// { dg-options "" }
struct A;
void
f1 (int i)
{
(int[i]) { 1 }; // { dg-error "variable-sized compound literal" }
(A[5]) { 1 }; // { dg-error "have incomplete type" }
(A[i]) { 1 }; // { dg-error "have incomplete type" }
}
void
f2 ()
{
(int[]) { 1 };
(int[1]) { 1 };
}... |
google | chromium | altivec-9 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/altivec-9.C | 355 | utf_8 | 5bc21f478c5c54165eb98a3afe01f181 | /* Test for AltiVec function vec_ld, passing a pointer to const vector */
/* { dg-do compile { target powerpc*-*-* } } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec" } */
#include <altivec.h>
typedef vector unsigned char vuc_t;
const vuc_t* p;
vector unsigned char test_vec_ld(... |
google | chromium | vlm1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/vlm1.C | 170 | utf_8 | 11bcf00b0a6402fad7b9569e02318690 | // { dg-options "" }
template <class T> struct A {};
struct B {
static const int s;
A<int[s]> a; // { dg-error "array|template" }
};
const int B::s=16;
B b;
|
google | chromium | instantiate3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/instantiate3.C | 360 | utf_8 | 561bb7137df38a016a786156224c9769 | // Test that 'inline template' instantiates the vtable.
// { dg-do compile }
// { dg-options "-O -fno-implicit-templates" }
template <class T> struct A {
virtual void f () { }
};
inline template struct A<int>;
// { dg-final { scan-assembler "\n_?_ZTV1AIiE(:|\n|\t)" } }
A<int> a;
// { dg-final { scan-assembler-not ... |
google | chromium | pr28291 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/pr28291.C | 201 | utf_8 | 120e689afda3dc7576257e6a7ec0d8ae |
// Test to make sure we do not ICE on this invalid program.
// { dg-do compile }
// { dg-options "" }
struct A
{
static int i;
int j;
};
A a = { i:0 }; // { dg-error "non-static data member" }
|
google | chromium | cleanup-9 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/cleanup-9.C | 2,122 | utf_8 | cd3700a4142b5a693ac706905beabdc6 | /* { dg-do run { target hppa*-*-hpux* *-*-linux* powerpc*-*-darwin* *-*-darwin[912]* } } */
/* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
/* Verify that cleanups work with exception handling through realtime
signal frames. */
#include <unwind.h>
#include <stdlib.h>
#include <signal.h>
#include <str... |
google | chromium | tmplattr4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/tmplattr4.C | 263 | utf_8 | 13a9bd280c5578a4d3a70a4e930438d1 | // PR c++/7586
// { dg-do run }
template<typename T>
int f()
{
typedef unsigned char type[sizeof (T)]
__attribute((aligned(__alignof(T))));
return __alignof (type);
}
int main()
{
if (f<int>() == __alignof (int))
return 0;
else
return 1;
}
|
google | chromium | has_nothrow_assign | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/has_nothrow_assign.C | 2,519 | utf_8 | ddd6a150c6e731acb2ed3440640d50d1 | // { dg-do "run" }
#include <cassert>
struct A
{
double a;
double b;
};
struct B
{
A a;
};
struct C
: public A { };
struct D
{
D& operator=(const D&) throw() { return *this; }
};
struct E
{
E& operator=(const E&) throw(int) { return *this; }
};
struct E1
{
E1& operator=(const E1&) throw(int) { throw int(); ... |
google | chromium | desig1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/desig1.C | 309 | utf_8 | 739dd1176941bfc4e49f4d7f144da1d3 | // { dg-options "" }
struct a {
int x;
};
struct b {
int x;
int y;
};
struct foo {
union {
struct a a;
struct b b;
} u;
};
int main(void)
{
struct foo bar = { u: { b: { x: 0, y: 0, }}};
(void)bar;
return 0;
}
|
google | chromium | unary_trait_incomplete | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/unary_trait_incomplete.C | 2,778 | utf_8 | 6bf89b233bc22f82e85f50abc2d3bef3 | // PR c++/39475
struct I;
struct C { };
bool nas1 = __has_nothrow_assign(I); // { dg-error "incomplete type" }
bool nas2 = __has_nothrow_assign(C[]);
bool nas3 = __has_nothrow_assign(I[]);
bool nas4 = __has_nothrow_assign(void);
bool nas5 = __has_nothrow_assign(const void);
bool tas1 = __has_trivial_assign(I); // { ... |
google | chromium | lvaddr | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/lvaddr.C | 192 | utf_8 | 92a7056cf4009e7b4513a036edcef967 | // { dg-do compile }
void f()
{
int n;
char* p = &(char) n; // { dg-error "lvalue" }
} |
google | chromium | anon-struct6 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/anon-struct6.C | 283 | utf_8 | 72746a0d7f31bf889b45b24a8426c590 | // PR c++/33460
struct A
{
struct
{ // { dg-error "anonymous struct cannot have function members" }
struct { static int i; }; // { dg-error "prohibits anonymous structs|non-static data members" }
void foo() { i; }
}; // { dg-error "prohibits anonymous structs" }
};
|
google | chromium | vla5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/vla5.C | 149 | utf_8 | 98395fbe8def84169d327400e5e3f8dd | // PR c++/37417
// { dg-do compile }
// { dg-options "-O" }
void
test (int a)
{
new (char[a]);
} |
google | chromium | vector9 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/vector9.C | 197 | utf_8 | b79e2b0f0e2ad656cfc1480a14e2166a | // PR c++/34891
typedef float v4f __attribute__((vector_size(8)));
typedef int v4i __attribute__((vector_size(8)));
void foo()
{
v4f v;
!(v4i)v; // { dg-error "int __vector__|argument" }
}
|
google | chromium | attrib3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/attrib3.C | 439 | utf_8 | 7d022bc15e4179e83cb22834a71091af | // Test that attributes work in a variety of situations.
// { dg-options -O }
// { dg-do run }
#define attrib __attribute ((mode (QI)))
attrib signed int a; // attributes before type are broken
static attrib unsigned int b;
int foo(attrib int o) // attribute arguments are broken
{
return (sizeof (a) != 1
|| s... |
google | chromium | dllimport-MI1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/dllimport-MI1.C | 1,099 | utf_8 | 8762efb9149a937554f3e867cca0e9d8 | // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw*} }
// Test handling of MI thunks in dllimported classes.
// To build the dll and client app:
// g++ -shared -o MI.dll dllexport-MI1.C
// g++ -o MItest.exe dllimport-MI1.C -L. MI.dll
#include <stdlib.h>
#include "dll-MI1.h"
extern DLL_IMPEXP MI1 dllMI1;
// T... |
google | chromium | attrib5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/attrib5.C | 783 | utf_8 | ec01dbb0bb96c7cda806a516a5cf87d4 | // There were two related problems here, depending on the vintage. At
// one time:
//
// typedef struct A { ... } A __attribute__ ((aligned (16)));
//
// would cause original_types to go into an infinite loop. At other
// times, the attributes applied to an explicit typedef would be lost
// (check_b3 would have a ... |
google | chromium | label1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/label1.C | 141 | utf_8 | 7448fb50d33d0e0b5699d1a46190acd0 | // { dg-options "" }
int main(void) {
static const void* lbls[2][2] = {{&&lbl0, &&lbl0}, {&&lbl0, &&lbl0}};
goto *lbls[0];
lbl0:
;
}
|
google | chromium | utf-rtti | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/utf-rtti.C | 284 | utf_8 | f2f226beecfd8f6e19653afe7231d791 | /* Ensure that typeinfo data is generated for char16_t/char32_t. */
/* { dg-do link } */
/* { dg-options "-std=c++0x" } */
#include <typeinfo>
int main(void)
{
typeid(char16_t).name();
typeid(char32_t).name();
} |
google | chromium | packed4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/packed4.C | 1,184 | utf_8 | bcf9b6873e48870b8f6014b5da708cd3 | // { dg-do run { target { ! default_packed } } }
// { dg-options "-w" }
// Packed fields are unsuitable for direct reference binding.
struct Unpacked { int i; };
int ConstRef (int const &p, int const *ptr, int v)
{
if (p != v)
return 1;
if (&p == ptr)
return 2;
return 0;
}
int ConstRef (Unpacked const &p,... |
google | chromium | c99struct1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/c99struct1.C | 155 | utf_8 | 584e264d76b42642e1d520318920eb9c | // { dg-options "" }
// C99 anon struct variable with array accesses.
struct s { int a[1]; };
void
foo5 (void)
{
((struct s) { { 0 } }).a[0] = 1;
}
|
google | chromium | gnu-inline-global-redecl | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/gnu-inline-global-redecl.C | 371 | utf_8 | 83baade7989ec401bd49db5363e07e77 | /* Test __attribute__((gnu_inline)).
Check that we don't get out-of-line definitions for extern inline
gnu_inline functions, regardless of redeclaration.
*/
/* { dg-do link } */
/* { dg-options "-O" } */ // such that static functions are optimized out
#include "gnu-inline-common.h"
decl(extern, fn)
gnuindef... |
google | chromium | attrib35 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/attrib35.C | 464 | utf_8 | 72dcf6393fd2127116d516c2816413ba | // { dg-do compile { target i*86-*-* x86_64-*-* } }
// { dg-options "-O3 -msse2" }
// You can make NON-template typedefs with a large alignment.
typedef double AlignedDoubleType __attribute__((aligned(16)));
template <typename RealType>
RealType f(const RealType* p)
{
// But if you use a template parameter it compl... |
google | chromium | typeof10 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/typeof10.C | 236 | utf_8 | a9f6e5ffa8ee45297e80ce1461434dc7 | // PR c++/20552
template<int> struct A
{
void foo()
{
typedef int T; // { dg-error "previous" }
typedef __typeof__(*this) T; // { dg-error "conflicting" }
}
}; |
google | chromium | has_nothrow_copy-6 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/has_nothrow_copy-6.C | 161 | utf_8 | 683b5fae158dbf72cfe24417308a4a1a | // { dg-do "run" }
#include <cassert>
struct S {
S (S&) throw ();
S (const S&, int) throw (int);
};
int main ()
{
assert (__has_nothrow_copy (S));
}
|
google | chromium | vector13 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/vector13.C | 156 | utf_8 | 0b89905c123e9d47c7e0b5514f4c50e2 | // PR c++/35096
// { dg-do compile }
typedef const int X __attribute((vector_size(8)));
extern const int x[] __attribute((vector_size(8)));
X x[] = { 5 };
|
google | chromium | label12 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/label12.C | 454 | utf_8 | 0c4dee38ff36603320c2d05c89f20b89 | // PR c++/39028
// { dg-do compile }
void
f ()
{
int i;
for (i = 0; i < 2; i++)
{
__label__ l;
goto l;
l:;
}
while (i++ < 5)
{
__label__ l;
goto l;
l:;
}
do
{
__label__ l;
goto l;
l:;
}
while (i++ < 8);
if (1)
{
__label_... |
google | chromium | complit5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/complit5.C | 142 | utf_8 | 5caaf9e2321715eb7f6a18ff81d49dda | // PR c++/25417
// { dg-options "" }
struct object {
int a;
int b;
};
void f (int c, int d)
{
object o = ((object){ a : c, b : d});
}
|
google | chromium | asm8 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/asm8.C | 352 | utf_8 | 9c3b7de14ce6ac49627b91e2808376e5 | /* { dg-do compile } */
/* Test that asm with no outputs are treated as volatile. */
void f(int x)
{
__asm__ ("extended asm not discarded" : : "r" (x));
}
void g (void)
{
__asm__ ("simple asm not discarded");
}
/* { dg-final { scan-assembler "extended asm not discarded" } } */
/* { dg-final { scan-assembler "si... |
google | chromium | is_enum | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/is_enum.C | 1,060 | utf_8 | 0ae0b89107bfa1fc2ca82a358f64505e | // { dg-do "run" }
#include <cassert>
struct A
{
double a;
double b;
};
class B
{ };
enum E
{
e0
};
template<typename T>
bool
f()
{ return __is_enum(T); }
template<typename T>
class My
{
public:
bool
f()
{ return !!__is_enum(T); }
};
template<typename T>
class My2
{
public:
... |
google | chromium | typeof8 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/typeof8.C | 263 | utf_8 | a9d136cfb86815cbf4d2e46089c90ce0 | // PR c++/14116
// Any use of typeof in a templete was causing an ICE.
// { dg-options "" }
struct vector { typedef int iterator; };
vector read_queue;
template <class T> void f(){
typedef typeof (read_queue) read_queue_t;
read_queue_t::iterator it;
}
|
google | chromium | stmtexpr4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/stmtexpr4.C | 119 | utf_8 | 7f4e8ebedb382ebc1349d7067b034121 | // PR c++/20147
// { dg-do compile }
// { dg-options "" }
void foo()
{
({x;}); // { dg-error "was not declared" }
}
|
google | chromium | vector11 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/vector11.C | 102 | utf_8 | 86631ce973fe08bf3f9ad84e595fb594 | // PR c++/34913
template<typename T> struct A
{
int x[sizeof(T)] __attribute((vector_size(8)));
};
|
google | chromium | alignof2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/alignof2.C | 351 | utf_8 | 0c971bcbaac508ae1054a9ee28a27be8 | // PRs 16387 and 16389
// We were treating alignof (sa.a) as alignof (typeof (sa.a)), which is
// wrong for some fields.
// { dg-do run }
extern "C" void abort();
struct A
{
double a;
} sa;
struct B
{
char c;
double b;
} sb;
int main()
{
if (__alignof (sa) != __alignof (sa.a)
|| __alignof (sb) != __... |
google | chromium | bitfield4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/bitfield4.C | 362 | utf_8 | b9dcf1ba56b6782c19ca555e3554c6a3 | /* { dg-do compile } */
/* { dg-options "" } */
/* { dg-options "-mno-ms-bitfields" { target i?86-*-netware } } */
struct t
{ /* { dg-message "note: Offset of packed bit-field 't::b' has changed in GCC 4.4" "" { target pcc_bitfield_type_matters } } */
char a:4;
char b:8 __attribute__ ((packed));
char c:4;
};
in... |
google | chromium | tmplattr8 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/tmplattr8.C | 182 | utf_8 | bcdc198bba142d390818f427b8129565 | // PR c++/28560
template<typename> struct A {};
template<int> struct B;
template<int N> struct C :
A<typename B<N>::X __attribute__((unused))> {}; // { dg-warning "attribute" }
|
google | chromium | construct1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/construct1.C | 176 | utf_8 | 10abc828e1142ff735666c5c8f9d280f | // PR c++/16717
// { dg-options "-O2" }
int i;
void hello (void) __attribute__ ((constructor));
void hello (void) { i = 1; }
int main (void) {
if (i != 1)
return 1;
}
|
google | chromium | builtin10 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/builtin10.C | 1,427 | utf_8 | 8e27d5e71c6ca468b0da85a6f69c93ca | // { dg-do compile { target correct_iso_cpp_string_wchar_protos } }
// { dg-options "-O2 -fdump-tree-optimized" }
#include <cstring>
const void *cv1;
const char *cc1, *cc2, *cc3, *cc4;
void *v1;
char *c1, *c2, *c3, *c4;
void
f1 (void)
{
cv1 = memchr ("abcba", 'b', 3);
cc1 = strchr ("abcba", 'b');
cc2 = strrchr... |
google | chromium | attrib26 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/attrib26.C | 296 | utf_8 | 974eff96719a23fa80e58b0108eba0c3 | // PR c++/28659
// The attribute was causing us to get confused in merge_types when
// combining the template type with an uninstantiated version.
template<class T>
struct __attribute__((aligned(1))) A
{
A& operator=(const A &t);
};
template<class T>
A<T>& A<T>::operator=(const A<T> &t)
{
}
|
google | chromium | altivec-12 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/altivec-12.C | 397 | utf_8 | ce4ff2095f5aadd1429d75f9964e3068 | /* Test vec_dst* functions with float pointer as first argument. */
/* { dg-do compile { target powerpc*-*-* } } */
/* { dg-require-effective-target powerpc_altivec_ok } */
/* { dg-options "-maltivec" } */
#include <altivec.h>
extern int i;
extern float *fp;
extern vector float vf;
void
foo ()
{
vec_dst (fp, i, 1... |
google | chromium | anon-struct5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/anon-struct5.C | 262 | utf_8 | 0746023f7d159fb8e9a9c90f3e5b1396 | // PR c++/30302
struct A
{
struct { static int i; }; // { dg-error "prohibits anonymous structs|an anonymous struct" }
void foo() { i; }
};
struct B
{
union { static int i; }; // { dg-error "an anonymous union|member of a union" }
void foo() { i; }
};
|
google | chromium | tmplattr2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/tmplattr2.C | 388 | utf_8 | 089638758b33bf99338184db0181179c | // PR c++/17743
template <unsigned Len, unsigned Align>
struct aligned_storage
{
typedef char type[Len] __attribute__((aligned((Align))));
};
template<typename T>
struct X
{
typename aligned_storage<sizeof(T),__alignof(T)>::type data;
};
template<bool> struct StaticAssert;
template<> struct StaticAssert<true> {}... |
google | chromium | label9 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/label9.C | 190 | utf_8 | c510e07acd289ccbf9cf0ca2264c4ad7 | // PR c++/32121
// { dg-do compile }
int f (void)
{
while (1)
__label__ a; // { dg-error "not at the beginning" }
for (;;)
__label__ b; // { dg-error "not at the beginning" }
}
|
google | chromium | tmplattr1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/tmplattr1.C | 402 | utf_8 | b8a7bc7b0dc38a84a435cecd41d9f4c3 | // PR c++/24260
// { dg-do compile { target i?86-*-* x86_64-*-* } }
// { dg-require-effective-target ilp32 }
#define stdcall __attribute__((stdcall))
struct T {
template <class S>
static int stdcall func(int arg1, int arg2);
};
template <class S>
int stdcall T::func(int arg1, int arg2)
{
return arg1+arg2;
}
s... |
google | chromium | vector6 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/vector6.C | 342 | utf_8 | 9dca9632e59d179ee1b85a181a34cae7 | // { dg-options "" }
// { dg-do compile }
// C++/30016, we were allowing conversion between vector types
// and union types which is invalid.
typedef float __v_4F __attribute__ ((vector_size (16)));
typedef union {__v_4F v; float a[4];} __v4F;
void f(void)
{
__v_4F b;
(reinterpret_cast<__v4F>(b).a)[1] = 1;... |
google | chromium | vector15 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/vector15.C | 161 | utf_8 | 609de4a1bd102907e8c94926e720e269 | /* { dg-do compile } */
/* Check that we error out when using vector_size on the bool type. */
__attribute__((vector_size(16) )) bool a; /* { dg-error "" } */
|
google | chromium | cleanup-3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/cleanup-3.C | 580 | utf_8 | 8947a9ede099a6adc4fdf950293341b9 | /* { dg-do run } */
/* { dg-options "" } */
/* Verify that the cleanup handler receives the proper contents
of the variable. */
extern "C" void exit(int);
extern "C" void abort(void);
static int expected;
static void
handler(int *p)
{
if (*p != expected)
abort ();
}
static void __attribute__((noinline))
b... |
google | chromium | array2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/array2.C | 257 | utf_8 | f1a9da555162b7ed9f63dd442d842c1c | // { dg-do compile }
// Avoid -pedantic-error default
// { dg-options "" }
// PR 19989 - dependent array of size 0 fails to compile.
template<int I> struct A
{
static const int zero = 0;
};
template<int N> struct B
{
int x[A<N>::zero];
};
B<0> b;
|
google | chromium | is_empty | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/is_empty.C | 1,143 | utf_8 | 1fc9c68973f25404ea587aa6ed700dc7 | // { dg-do "run" }
#include <cassert>
struct A
{
double a;
double b;
};
struct B
{
virtual ~B() { }
};
class C
{ };
union U
{ };
template<typename T>
bool
f()
{ return __is_empty(T); }
template<typename T>
class My
{
public:
bool
f()
{ return !!__is_empty(T); }
};
template<typename T>
... |
google | chromium | utf-cvt | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/utf-cvt.C | 1,799 | utf_8 | 4b8fa376ae347ac191c6d32bbe4863f0 | /* Test the char16_t and char32_t promotion rules. */
/* { dg-do compile } */
/* { dg-options "-std=c++0x -Wall -Wconversion -Wsign-conversion -Wsign-promo" } */
extern void f_c (char);
extern void fsc (signed char);
extern void fuc (unsigned char);
extern void f_s (short);
extern void fss (signed short);
extern void f... |
google | chromium | stmtexpr10 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/ext/stmtexpr10.C | 214 | utf_8 | b1f2237b354111a738a7ac26e40fca77 | /* { dg-do compile } " */
/* { dg-options "" } */
void foo(int i)
{
(i ? 1 : 2) = ({ X; }); /* { dg-error "" } */
}
struct A
{
~A ();
void foo()
{
delete this = ({ X; }); /* { dg-error "" } */
}
};
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.