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 | android | array25 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/init/array25.C | 665 | utf_8 | cd3850e151894462d2f417f022f58b7c | // related to PR c++/38233
// test for value-init of a member array
// { dg-do run }
struct elt
{
virtual void f();
char c;
};
void elt::f() { }
struct foo {
elt buffer[500];
foo() ;
bool check () const;
};
foo::foo ()
: buffer()
{}
bool foo::check () const
{
for (unsigned ix = sizeof (buffer)/ size... |
google | android | deep-tail-call-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/asan/deep-tail-call-1.C | 1,093 | utf_8 | 4e86c0ef9d270fec543cb98a8e032be4 | // { dg-do run }
// { dg-options "-fno-omit-frame-pointer -fno-optimize-sibling-calls" }
// { dg-additional-options "-mno-omit-leaf-frame-pointer" { target { i?86-*-* x86_64-*-* } } }
// { dg-shouldfail "asan" }
int global[10];
void __attribute__((noinline)) call4(int i) { global[i+10]++; }
void __attribute__((noinlin... |
google | android | deep-thread-stack-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/asan/deep-thread-stack-1.C | 1,588 | utf_8 | b2988101c810da55bd5189f442c038b7 | // { dg-do run { target pthread } }
// { dg-options "-lasan -lpthread" }
// { dg-shouldfail "asan" }
#include <pthread.h>
int *x;
void *AllocThread(void *arg) {
x = new int;
*x = 42;
return NULL;
}
void *FreeThread(void *arg) {
delete x;
return NULL;
}
void *AccessThread(void *arg) {
*x = 43; // BOOM
... |
google | android | interception-failure-test-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/asan/interception-failure-test-1.C | 540 | utf_8 | 6a60061a97076056217dbb01be7089e7 | // If user provides his own libc functions, ASan doesn't
// intercept these functions.
// { dg-do run }
// { dg-options "-fno-builtin-malloc -fno-builtin-free" }
// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu } } }
#include <stdlib.h>
#include <stdio.h>
extern "C" long strtol(const char *nptr,... |
google | android | deep-stack-uaf-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/asan/deep-stack-uaf-1.C | 1,188 | utf_8 | fd51a6807cb45e487c875203948b00ac | // Check that we can store lots of stack frames if asked to.
// { dg-do run }
// { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
// { dg-set-target-env-var ASAN_OPTIONS "malloc_context_size=120:redzone=512" }
// { dg-options "-fno-omit-frame-pointer -fno-optimize-sibling-calls" }
// { dg-additional-options "-mno-omit-l... |
google | android | interception-test-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/asan/interception-test-1.C | 802 | utf_8 | 5ec947b9e800038195a332828bd0637b | // ASan interceptor can be accessed with __interceptor_ prefix.
// { dg-do run }
// { dg-options "-fno-builtin-malloc -fno-builtin-free" }
// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu } } }
// { dg-shouldfail "asan" }
// { dg-skip-if "Darwin uses mac function interposition" { *-*-darwin* } }
... |
google | android | symbolize-callback-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/asan/symbolize-callback-1.C | 448 | utf_8 | 9834ddf0add6cede70fe54b0fa041b94 | // { dg-do run }
// { dg-skip-if "" { *-*-* } { "*" } { "-O2" } }
// { dg-options "-fno-builtin-malloc -fno-builtin-free" }
// { dg-shouldfail "asan" }
#include <stdio.h>
#include <stdlib.h>
extern "C"
bool __asan_symbolize(const void *, char *out_buffer, int out_size) {
snprintf(out_buffer, out_size, "MySymbolize... |
google | android | interception-malloc-test-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/asan/interception-malloc-test-1.C | 679 | utf_8 | c109f79c447a9f4bd35cac5dbc643adb | // ASan interceptor can be accessed with __interceptor_ prefix.
// { dg-do run { target *-*-linux* } }
// { dg-options "-fno-builtin-free" }
// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu } } }
// { dg-shouldfail "asan" }
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
extern "C" vo... |
google | android | asan_test | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/asan/asan_test.C | 997 | utf_8 | 6e27984de47dc67b826aa018d29b3fc2 | // { dg-do run { target { { i?86-*-linux* x86_64-*-linux* } && sse2_runtime } } }
// { dg-skip-if "" { *-*-* } { "*" } { "-O2" } }
// { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
// { dg-additional-sources "asan_globals_test-wrapper.cc" }
// { dg-options "-fsanitize=address -fno-builtin -Wall -Wno-format -Werror -g -... |
google | android | pr62017 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/asan/pr62017.C | 206 | utf_8 | 74a04a20e12a8acd0fd7d05742cf8d63 | // PR c++/62017
// { dg-do run }
struct A
{
int x;
virtual ~A () {}
};
struct B : public virtual A {};
struct C : public virtual A {};
struct D : public B, virtual public C {};
int
main ()
{
D d;
}
|
google | android | large-func-test-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/asan/large-func-test-1.C | 1,320 | utf_8 | 405dc035b1ccdb4f0af709d88d7f1e5e | // { dg-do run }
// { dg-shouldfail "asan" }
#include <stdlib.h>
__attribute__((noinline))
static void LargeFunction(int *x, int zero) {
x[0]++;
x[1]++;
x[2]++;
x[3]++;
x[4]++;
x[5]++;
x[6]++;
x[7]++;
x[8]++;
x[9]++;
x[zero + 111]++; // we should report this exact line
x[10]++;
x[11]++;
... |
google | android | pr55617 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/asan/pr55617.C | 85 | utf_8 | e472f2ce37f2b55b1358ec08717d9f08 | // { dg-do run }
struct c18 {
virtual void bar() { }
};
c18 ret;
int main () {
}
|
google | android | default-options-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/asan/default-options-1.C | 313 | utf_8 | 8827e1210f0ca517dab04457b81303fa | // { dg-do run }
const char *kAsanDefaultOptions="verbosity=1 foo=bar";
extern "C"
__attribute__((no_sanitize_address))
const char *__asan_default_options() {
return kAsanDefaultOptions;
}
int main() {
return 0;
}
// { dg-output "Using the defaults from __asan_default_options:.* foo=bar.*(\n|\r\n|\r)" }
|
google | android | __func__ | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/__func__.C | 110 | utf_8 | 1388db9b52c8fb258faed2c95049bb99 | // { dg-do compile { target c++11 } }
// { dg-options "-pedantic" }
const char* foo()
{
return __func__;
}
|
google | android | noexcept02 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/noexcept02.C | 1,239 | utf_8 | 299182935ddbae53b3313c266eead30d | // Test for noexcept-specification
// { dg-do compile { target c++11 } }
#define SA(X) static_assert(X, #X)
void f();
void f() noexcept(false);
void f() noexcept(1 == 0);
void f();
SA(!noexcept(f()));
void g() throw (int); // { dg-error "previous declaration" }
void g() noexcept(false); // { dg-error "different ex... |
google | android | variadic120 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic120.C | 401 | utf_8 | c207314d34d2c8ddb1c0be9ae8dc6dd6 | // PR c++/48322
// { dg-do compile { target c++11 } }
template <class... T> struct tuple;
template <class T> struct tuple<T> { T t; };
template <class T, class U> struct pair;
template<> struct pair<int,double> { };
template <class... Ts>
struct A
{
template <class... Us,
class V = tuple<pair<Ts,Us>...... |
google | android | decltype16 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype16.C | 345 | utf_8 | 8a9766dbcc0cb4d41d6a3ebb14e369ee | // PR c++/39070
// { dg-do compile { target c++11 } }
template<typename X> struct junk {
template<typename Z> static Z y();
template<typename Y> static int test(...);
template<typename Y> static char test(decltype(y<Y>())*);
static int const value=sizeof(test<X>(0));
};
typedef char type[junk<int>::value=... |
google | android | range-for12 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/range-for12.C | 2,067 | utf_8 | 22acc783be03cde2f30fafef0d50d9a2 | // Test for range-based for loop with templates
// and begin/end as member functions
// { dg-do run { target c++11 } }
/* Preliminary declarations */
namespace pre
{
struct iterator
{
int x;
explicit iterator (int v) :x(v) {}
iterator &operator ++() { ++x; return *this; }
int operator *() { return x... |
google | android | variadic-ttp | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic-ttp.C | 230 | utf_8 | b8b4ef414480ac8cc610a96093ab666f | // { dg-do compile { target c++11 } }
// PR c++/34101
template<typename> struct A {};
template<template<typename> class...> struct B {};
template<template<typename> class T> void foo(const B<T>&);
void bar()
{
foo(B<A>());
}
|
google | android | decltype45 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype45.C | 590 | utf_8 | 54dcc9841c374062b51b3eb83ed44320 | // PR c++/51878
// { dg-do compile { target c++11 } }
template<class F, class... T>
auto indirect_call(F f, T... t) -> decltype(f(t...))
{
return f(t...);
}
template<class F, class T>
struct VariadicBind
{
F f;
T t;
template<class... A>
auto operator()(A... a) -> decltype(indirect_call(f, t, a...))
{
... |
google | android | static_assert1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/static_assert1.C | 406 | utf_8 | e3c4cd6748b5a83f7b2c14889d2c4590 | // { dg-do compile { target c++11 } }
void foo()
{
static_assert(1, "okay");
static_assert (0 == 1, "zero is never equal to one"); // { dg-error "never equal" }
}
class X {
static_assert(1, "okay");
static_assert (0 == 1, "zero is never equal to one"); // { dg-error "never equal" }
};
static_assert(1, "okay")... |
google | android | gen-attrs-5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-5.C | 794 | utf_8 | feda9cf61822bf0cc77fdb3e2354e050 | // { dg-do compile { target c++11 } }
//
// There were two related problems here, depending on the vintage. At
// one time:
//
// typedef struct A { ... } A [[gnu::aligned (16)]];
//
// would cause original_types to go into an infinite loop. At other
// times, the attributes applied to an explicit typedef would be... |
google | android | variadic64 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic64.C | 514 | utf_8 | 3b1d4a7dc69b3a2a4681d7d538330e00 | // { dg-do compile { target c++11 } }
template<int... Indexes>
struct _Index_tuple { };
template<int _Num, typename _Tuple = _Index_tuple<> >
struct _Build_index_tuple;
template<int _Num, int... _Indexes>
struct _Build_index_tuple<_Num, _Index_tuple<_Indexes...> >
: _Build_index_tuple<_Num - 1,
... |
google | android | initlist22 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist22.C | 780 | utf_8 | 14c3540aa98f89390f2b8b7ed3442917 | // Core issue 934/1288
// { dg-do compile { target c++11 } }
int i;
int& r1{ i }; // OK, direct binding
int&& r2{ i }; // { dg-error "" } binding && to lvalue
int& r3{ }; // { dg-error "" } reference to temporary
int&& r4{ }; // OK, reference to temporary
struct A { int i; } a;
A& r5 { i }; // { dg-error... |
google | android | udlit-preproc-neg | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/udlit-preproc-neg.C | 321 | utf_8 | e36b06fea6cc51441ed57d06d38388e7 | // { dg-do compile { target c++11 } }
int
operator"" _badpreproc(const char *str)
{ return 0; }
#if 123_badpreproc // { dg-error "user-defined literal in preprocessor expression" }
# error ("user-defined literal in preprocessor expression") // { dg-error "user-defined literal in preprocessor expression" }
#endif... |
google | android | constexpr-array-tparm | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-array-tparm.C | 141 | utf_8 | 285061f8bf48bec65094d1e65f728b9a | // { dg-do compile { target c++11 } }
template <const int I[2]> struct A { int ir[I[0]]; };
extern constexpr int ar[2] = { 1, 2 };
A<ar> a;
|
google | android | decltype46 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype46.C | 170 | utf_8 | b6860c73cefcae60eb68cf0330f2aa17 | // PR c++/55558
// { dg-do compile { target c++11 } }
struct A
{
static int member;
};
template<typename T> void foobar ()
{
typedef decltype (A::member) myType;
}
|
google | android | variadic14 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic14.C | 647 | utf_8 | f761d165b2500686447e98c40a9bc2c0 | // { dg-do compile { target c++11 } }
template<typename R, typename... ArgTypes>
struct make_function_type
{
typedef R type(ArgTypes...);
};
template<typename T, typename U>
struct is_same {
static const bool value = false;
};
template<typename T>
struct is_same<T, T> {
static const bool value = true;
};
int a... |
google | android | constexpr-attribute2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-attribute2.C | 784 | utf_8 | 227bc499e99c2762ddd9c7f10396a2b7 | // { dg-do compile { target init_priority } }
// { dg-require-effective-target c++11 }
struct t { t(); };
constexpr int prio = 123;
constexpr int size = 8;
constexpr int pos = 1;
enum A { zero = 0, one, two };
__attribute__((init_priority(prio))) t a;
enum class E1 : int {
first = 101,
second,
third,
};
... |
google | android | constexpr-array-ptr3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr3.C | 415 | utf_8 | 0a82455c1794efadc3bbb4e4ba357339 | // { dg-do compile { target c++11 } }
constexpr bool is_negative(int x) {
return x < 0;
}
constexpr bool do_has_neg(const int* x, bool(*p)(int)) {
return p(x[0]) || p(x[1]); // Line 6
}
constexpr bool has_neg(const int (&x)[2], bool(*p)(int)) {
return do_has_neg(x, p); // Line 10
}
constexpr int a[] = {1, -2};... |
google | android | constexpr-array5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-array5.C | 243 | utf_8 | 58d6b6fecbd11dbf0627f8bfc311a5f6 | // PR c++/56582
// { dg-do compile { target c++11 } }
// Reliable ICE
constexpr int n[3] = {};
constexpr int k = n[-1]; // { dg-error "negative" }
// Some random byte
constexpr char c = "foo"[-1000]; // { dg-error "negative" }
|
google | android | constexpr-const1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-const1.C | 177 | utf_8 | d0cf4047a18cf95475f57cf96be3f551 | // PR c++/54086
// { dg-do compile { target c++11 } }
static constexpr const char Data[] = {
'D', 'A', 'T', 'A',
};
static constexpr const char *data_func() { return Data; }
|
google | android | constexpr-default1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-default1.C | 264 | utf_8 | 670301964142ce35b76536de5b9b09c4 | // PR c++/53464
// { dg-do compile { target c++11 } }
template <int value>
struct bar
{
static constexpr int get()
{
return value;
}
};
template <typename A, int value = A::get()>
struct foo
{
};
int main()
{
typedef foo<bar<0>> type;
return 0;
}
|
google | android | enum3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/enum3.C | 401 | utf_8 | 8d9beca38ea27fd3108a3981efe82cc1 | // PR c++/38064
// { dg-do run { target c++11 } }
enum class E { elem };
template <class T>
void f (T t);
bool f (bool b) { return b; }
int main()
{
E e = E::elem;
if (!f (e == E::elem))
return 1;
if (!f (e <= E::elem))
return 1;
if (!f (e >= E::elem))
return 1;
if (f (e < E::elem))
return... |
google | android | gen-attrs-3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-3.C | 452 | utf_8 | b4ff1e96e1436f9ab9b0325baef556eb | // Test that attributes work in a variety of situations.
// { dg-options "-O -ftrack-macro-expansion=0" }
// { dg-do run { target c++11 } }
#define attrib [[gnu::mode (QI)]]
#define gnu_attrib __attribute((mode (QI)))
attrib signed int a;
static unsigned int b attrib;
int foo(attrib int o)
{
return (sizeof (a) != ... |
google | android | implicit3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/implicit3.C | 783 | utf_8 | bb3cecf4f0926b6e97d681a7ac6375b4 | // Basic runtime test for implicit move constructor
// { dg-do run { target c++11 } }
int m;
struct A
{
A() = default;
A(A&&) { ++m; }
A& operator=(A&&) { ++m; return *this; }
};
struct B
{
B() = default;
B(const B&);
B(B&&) { ++m; }
B& operator=(const B&);
B& operator=(B&&) { ++m; return *this; }
};... |
google | android | rv4p | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv4p.C | 49,557 | utf_8 | de33eb6368fe9d352b73fa59215f32a5 | // I, Howard Hinnant, hereby place this code in the public domain.
// Test overload resolution among reference types
// { dg-do compile { target c++11 } }
// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
template <bool> struct sa;
template <> struct sa<tr... |
google | android | elision2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/elision2.C | 182 | utf_8 | 61e6b95f09ff3fc301b7bd5af3f1e592 | // Core 1148: should be able to move from value parameter on return
// { dg-do compile { target c++11 } }
struct A
{
A(const A&) = delete;
A(A&&);
};
A f (A a)
{
return a;
}
|
google | android | nsdmi-defer2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer2.C | 115 | utf_8 | 4e737e4950688a6f722d97a47d7cf157 | // { dg-do compile { target c++11 } }
struct A
{
int i = f();
static int f(int i = 42) { return i; }
};
A a;
|
google | android | nsdmi-const1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi-const1.C | 101 | utf_8 | 333540e9a24be2138a5f0577b985d91d | // PR c++/50707
// { dg-do compile { target c++11 } }
int g;
struct S {
int const v=g;
};
S s;
|
google | android | forw_enum9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/forw_enum9.C | 475 | utf_8 | 6f64520612f591c08d6cb2e31cebdb29 | // { dg-do compile { target c++11 } }
// { dg-options "" }
template<typename T> struct S1
{
enum E1 : int;
enum class E2 : int;
};
template<typename T> enum S1<T>::E1 : int { e1 };
template<typename T> enum class S1<T>::E2 : T { e2 };
template<> enum S1<int>::E1 : int { i1 };
template<> enum class S1<int>::E... |
google | android | udlit-raw-length | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/udlit-raw-length.C | 543 | utf_8 | b49dbecba3ef797eceeae3fe86a96622 | // { dg-do compile { target c++11 } }
// PR c++/50958
typedef decltype(sizeof(0)) size_type;
constexpr size_type
cstrlen_impl(const char* s, size_type i)
{
return s[i] ? cstrlen_impl(s, i + 1) : i;
}
constexpr size_type
cstrlen(const char* s)
{
return s ? cstrlen_impl(s, 0) : throw 0;
}
constexpr size_type
oper... |
google | android | stddef | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/stddef.C | 91 | utf_8 | c8339a090dcd3866e3bcee3adaa249a3 | // PR c++/54249
// { dg-do compile { target c++11 } }
#include <stddef.h>
::nullptr_t n;
|
google | android | udlit-friend | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/udlit-friend.C | 435 | utf_8 | e69574b29d74e1b9574f866ac163bf88 | // { dg-do compile { target c++11 } }
long double
operator"" _Hertz(long double);
class Foo
{
public:
Foo() { }
friend Foo operator"" _Bar(char);
friend long double
operator"" _Hertz(long double omega)
{ return omega / 6.28318530717958648; }
};
Foo
operator"" _Bar(char)
{ return Foo(); }
Foo f1 = operat... |
google | android | decltype14 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype14.C | 148 | utf_8 | 4ec2723baddfc9d905467688b0a93e32 | // PR c++/37540
struct A
{
int g() {return 0;}
};
template <typename T_>
void f(A a)
{
__decltype(a.g()) i;
}
int main()
{
f<int>(A());
}
|
google | android | range-for22 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/range-for22.C | 90 | utf_8 | 5fba2387248a226595cb9206caae7d72 | // { dg-do compile { target c++11 } }
template<int I> void f() {
for (auto i: {I} );
}
|
google | android | udlit-concat-neg | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/udlit-concat-neg.C | 270 | utf_8 | be1cf38ee74c1bc061a79ae435242931 | // { dg-do compile { target c++11 } }
#include <string>
std::string operator"" _xxx(const char*, size_t);
std::string operator"" _yyy(const char*, size_t);
std::string concat = "Hello, "_xxx "World!"_yyy; // { dg-error "inconsistent user-defined literal suffixes" }
|
google | android | constexpr-function1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-function1.C | 211 | utf_8 | b8767312f53e8514f3313a50a2077696 | // { dg-do compile { target c++11 } }
// From N2235
constexpr int veryabs(int x) { return x < 0 ? -x : x; }
constexpr long long_max() { return 2147483647; }
constexpr int verysquare(int x) { return x * x; }
|
google | android | noexcept05 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/noexcept05.C | 581 | utf_8 | 089ec1d7518156a5d6a94f2652816ae4 | // Make sure that we force an LSDA for a noexcept spec so
// that the personality routine will call terminate. Also check that we
// optimize away the EH cleanup for var because the personality routine
// will call terminate before unwinding: there should not be an EH region
// (i.e. LEHB/LEHE labels) around the call ... |
google | android | static_assert6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/static_assert6.C | 154 | utf_8 | be87eb6f527a213d6b73c8a9a9d444f5 | // PR c++/51397
// { dg-do compile { target c++11 } }
static_assert('X' != '\130', "'X' has the wrong value"); // { dg-error "'X' has the wrong value" }
|
google | android | constexpr-base3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-base3.C | 294 | utf_8 | 14b9322a5578f12fe61851ab48856949 | // PR c++/46526
// { dg-do run { target c++11 } }
struct Base
{
virtual int getid () = 0;
};
struct A : public Base
{
virtual int getid () { return 1; }
};
struct B : public Base
{
virtual int getid () { throw "here"; }
};
int
main ()
{
A a;
B b;
Base& ar = a;
ar.getid ();
}
|
google | android | alias-decl-2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-2.C | 698 | utf_8 | 0f68d4448507027ec33caca0494bcf52 | // { dg-do compile { target c++11 } }
template<class T> struct S0 {};
template<class T> using AS0 = S0<T>;
template<template<class> class TT>
void f(TT<int>);
template class AS0<char>; // { dg-error "alias templ\[^\n\r\]*specialization\[^\n\r\]*after\[^\n\r\]*class" }
void
foo()
{
AS0<int> a;
f(a);
}
template<... |
google | android | udlit-nounder-neg | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/udlit-nounder-neg.C | 426 | utf_8 | 39bbcb13a344635c89b2ac19653abe2d | // { dg-do compile { target c++11 } }
// Test user-defined literals.
// Test warning on declaration without leading underscore.
long double operator"" nounder(long double); // { dg-warning "literal operator suffixes not preceded by|are reserved for future standardization" }
template<char...>
int operator"" nounder... |
google | android | alias-decl-25 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/alias-decl-25.C | 190 | utf_8 | df5416e41f5f858fd2c867cd9fa67a4f | // PR c++/54859
// { dg-do compile { target c++11 } }
template<unsigned N>
using Num = int;
template<typename... Types>
using Count = Num<sizeof...(Types)>;
Count<int, char, void> i;
|
google | android | initlist19 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist19.C | 177 | utf_8 | 3b01be392c4f42dd04ff5062eda37432 | // { dg-do compile { target c++11 } }
// Allow other errors, too
// { dg-prune-output "error" }
void f(double);
int main()
{
f({{1}}); // { dg-error "too many braces" }
}
|
google | android | variadic103 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic103.C | 221 | utf_8 | 869ca8cc860ecb0dad26b26a3590f536 | // { dg-do compile { target c++11 } }
template<class T>
T&& create();
template<class T, class... Args>
void test() {
T t(create<Args>()...); // { dg-error "incomplete" }
(void) t;
}
int main() {
test<int[]>();
}
|
google | android | pr32253 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr32253.C | 153 | utf_8 | 20e4993c2292bb2fab6c287103a9fb16 | // { dg-do compile { target c++11 } }
template<void (*... fp)()> struct A
{
A() { fp(); } // { dg-error "not expanded|fp" }
};
void foo();
A<foo> a;
|
google | android | variadic-104 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic-104.C | 304 | utf_8 | c2935d37441711e00030dd4962af84b5 | // PR c++/45236
// { dg-do compile { target c++11 } }
template <class T, class S> class foo;
template<template<int...> class C, int... II, class S>
struct foo<C<II...>,S>
{
template <class U>
struct bar { typedef int type; };
};
template <int... I>
struct A {};
foo<A<3>, float>::bar<int> x;
|
google | android | constexpr-base4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-base4.C | 240 | utf_8 | f6676b44835c5329c16a5bb57f317adc | // PR c++/46626
// { dg-do run { target c++11 } }
struct A
{
virtual void f () = 0;
virtual ~A () { }
};
struct B : A
{
virtual void f () { }
};
static void
foo (A *a)
{
a->f ();
}
int
main ()
{
B b;
foo (&b);
return 0;
}
|
google | android | decltype42 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/decltype42.C | 722 | utf_8 | a62748c335775c13524854a1863cb205 | // PR c++/50545
// { dg-do compile { target c++11 } }
template< class T >
T&& declval();
// #1
template< class T >
auto f( int )
-> decltype( int{ declval<T>() } );
// #2
template< class >
void f( ... );
#define STATIC_ASSERT( ... ) static_assert( __VA_ARGS__, #__VA_ARGS__ )
template< class T, class U >
struct ... |
google | android | pr31444 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/pr31444.C | 220 | utf_8 | c37868a20d9dadee24bfb0a83ae67e2c | // { dg-do compile { target c++11 } }
template<typename... T> struct A
{
template<int> void foo(A<T>); // { dg-error "not expanded|T" }
};
void bar()
{
A<int>().foo<0>(A<int>()); // { dg-error "no member named" }
}
|
google | android | sfinae6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/sfinae6.C | 563 | utf_8 | 7d2a515d9dca41b0e82b2e6ea54bd2d3 | // PR c++/48113
// { dg-do compile { target c++11 } }
template<typename T> T declval();
struct tuple { };
struct F1
{
void operator()(tuple, int);
};
typedef void (*F2)(tuple, int);
template<typename F, typename T>
struct Bind
{
template<typename A,
typename R = decltype( F()(declval<T&>(), A(... |
google | android | defaulted34 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted34.C | 173 | utf_8 | 8ce238d38ebdb6d96b3033a8263de63e | // { dg-do compile { target c++11 } }
// { dg-final { scan-assembler "__cxa_deleted_virtual" } }
struct A
{
virtual void f();
virtual ~A() = delete;
};
void A::f() {}
|
google | android | initlist23 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist23.C | 202 | utf_8 | 64364ea12acb4240adbd595c64451aad | // { dg-do compile { target c++11 } }
#include <initializer_list>
struct A
{
A& operator=(int i);
A& operator=(std::initializer_list<int> l) { return *this; }
};
int main()
{
A a;
a = { };
}
|
google | android | nullptr21 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nullptr21.C | 809 | utf_8 | 5c7521d9bc8595b5bb8750f33b2498f2 | // { dg-do run { target c++11 } }
// Test throw and catch
extern "C" void abort (void);
typedef decltype(nullptr) nullptr_t;
int result[2];
void __attribute__((noinline))
foo (int i, int j)
{
result[i] = j;
}
int main()
{
try {
throw nullptr;
} catch (void*) {
foo (0, 1);
} catch (bool) {
foo ... |
google | android | fntmpdefarg2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg2.C | 404 | utf_8 | 8b46fc26c58195fd05de5a6953f25c49 | // PR c++/46831
// { dg-do compile { target c++11 } }
// { dg-options "" }
struct B { };
struct D : B { };
struct A {
template<typename T = void> operator D&(); // { dg-message "template conversion" }
operator long();
};
void f(long);
void f(B&);
struct A2 {
template<typename T = void> operator B&();
};
void ... |
google | android | variadic126 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic126.C | 140 | utf_8 | 91e9ef42c141ca1adb0a56f44631d89b | // PR c++/47220
// { dg-do compile { target c++11 } }
template < typename ... > struct A;
struct B : A < // { dg-error "invalid" }
{
};
|
google | android | constexpr-ctor12 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor12.C | 232 | utf_8 | 154f2f4f7f018a8dd74a0f5417673e20 | // PR c++/55753
// { dg-do compile { target c++11 } }
template <typename Tp>
struct C {
constexpr C(const Tp& r) { }
};
template <typename Tp>
struct B {
B() {
C<double> cpl = C<double>((true ? 1.0 : C<double>()));
}
};
|
google | android | static_assert11 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/static_assert11.C | 209 | utf_8 | 0ea0b0e18907f61140575a772dd41be0 | // PR c++/60254
// { dg-do compile { target c++11 } }
struct A
{
template<typename T> bool foo(T)
{
static_assert(foo(0), "Error"); // { dg-error "non-constant condition|constant expression" }
}
};
|
google | android | udlit-implicit-conv-neg | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/udlit-implicit-conv-neg.C | 3,521 | utf_8 | 76afb8e2d3b0d7f6b2be2134335c3519 | // { dg-do compile { target c++11 } }
#include <cstdint>
int operator"" _bar (long double);
double operator"" _foo (long long unsigned);
int i = 12_bar; // { dg-error "unable to find numeric literal operator|with|argument" }
double d = 1.2_foo; // { dg-error "unable to find numeric literal operator|with|argument" ... |
google | android | std-layout1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/std-layout1.C | 2,172 | utf_8 | 0d886197bcd772f2eff3bcdb10bdc464 | // { dg-do compile { target c++11 } }
// [basic.types]/10:
// Scalar types, standard-layout class types (Clause 9), arrays of such
// types and cv-qualified versions of these types (3.9.3) are collectively
// called standard-layout types.
// [class]/7:
// A standard-layout class is a class that:
// * has no non-static ... |
google | android | ref-qual14 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/ref-qual14.C | 426 | utf_8 | bf679e1b75877f28dc4d57155f61bcb1 | // PR c++/57825
// { dg-do compile { target c++11 } }
template<typename T>
struct target_class
{};
template<typename Class, typename Ret, typename... Args>
struct target_class<Ret (Class::*)(Args...)>
{};
template<typename Class, typename Ret, typename... Args>
struct target_class<Ret (Class::*)(Args...) &>
{};
tem... |
google | android | variadic16 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic16.C | 687 | utf_8 | ef6cd86993fd9e98b5c841e854f1e291 | // { dg-do compile { target c++11 } }
template<typename R, typename... ArgTypes>
struct make_function_type
{
typedef R type(const ArgTypes&... args);
};
template<typename T, typename U>
struct is_same {
static const bool value = false;
};
template<typename T>
struct is_same<T, T> {
static const bool value = tru... |
google | android | variadic28 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic28.C | 915 | utf_8 | a9c4af98975cc42fa29cbb53d4aaec26 | // { dg-do compile { target c++11 } }
template<typename Signature>
struct function_traits;
template<typename R, typename... ArgTypes>
struct function_traits<R(ArgTypes......)> {
typedef R result_type;
};
template<typename T, typename U>
struct same_type {
static const bool value = false;
};
template<typename T>
... |
google | android | udlit-cpp98-neg | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/udlit-cpp98-neg.C | 485 | utf_8 | c7c5b85000b7e7393d31feae90eee6d4 | // { dg-options "-std=c++98" }
#include <cstddef>
int
operator"" _mm(long double m) // { dg-warning "user-defined literals only available with" }
{ return int(1000.0L * m); }
int in = 0.0254_mm; // { dg-error "invalid suffix" }
int
operator"" _Q(const char *, std::size_t) // { dg-warning "user-defined literals only... |
google | android | defaulted7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted7.C | 295 | utf_8 | bbb1e584edf09356b8623f522ff03019 | // PR c++/38701, 38702
// { dg-do compile { target c++11 } }
void foo() = default; // { dg-error "cannot be defaulted" }
namespace
{
void bar() = default; // { dg-error "cannot be defaulted" }
}
enum E { e };
E& operator |= (E&, const E&) = default; // { dg-error "cannot be defaulted" }
|
google | android | sfinae46 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/sfinae46.C | 293 | utf_8 | c271006c8055b6ab792c26bdb8a60c51 | // PR c++/57419
// { dg-do compile { target c++11 } }
template< typename q >
decltype( &q::f ) t( q ) {}
char t( ... ) { return {}; }
class c { void f() = delete; };
class d { static void f() = delete; };
static_assert( sizeof( t( c() ) ), "c" );
static_assert( sizeof( t( d() ) ), "d" );
|
google | android | defaulted19a | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted19a.C | 343 | utf_8 | c6c23dba60439877ea9d4ecd95b6716b | // We allocate a cookie to help us run the destructor if it's non-trivial,
// even if it's deleted.
// { dg-do run { target c++11 } }
struct B { ~B() {} };
struct A
{
B b;
~A() = delete;
};
void *p = 0;
void *operator new[](__SIZE_TYPE__ t)
{
p = ::operator new (t);
return p;
}
int main()
{
A* ap = new A[5... |
google | android | gen-attrs-9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-9.C | 297 | utf_8 | 5dd92815927177080853d47a890f5439 | // { dg-do compile { target c++11 } }
class C;
struct S;
union U;
enum e {};
enum [[gnu::unused]] e; // { dg-warning "already defined" }
struct [[gnu::unused]] B *p; // { dg-warning "attributes" }
template <class T> struct A { };
struct [[gnu::unused]] A<int>; // { dg-warning "attributes" }
|
google | android | ref-qual16 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/ref-qual16.C | 280 | utf_8 | 0a3150042efce88e411aee61e7fe784f | // PR c++/64297
// { dg-do compile { target c++11 } }
struct A {
typedef int X;
template <int> X m_fn1() const;
};
template <typename> struct is_function {};
is_function<int() const &> i;
struct D {
template <typename Y, typename = is_function<Y>> D(Y);
} b(&A::m_fn1<0>);
|
google | android | constexpr-empty2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-empty2.C | 182 | utf_8 | aef682375c033fe1283502c7f213d6ca | // { dg-do compile { target c++11 } }
struct IsLiteral {};
constexpr IsLiteral bar(IsLiteral x) { return x; }
constexpr auto xy = bar(IsLiteral()); // #1 Error, but should be OK
|
google | android | variadic37 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic37.C | 270 | utf_8 | 9d67c3ea87784b8527535dd4d9eb6951 | // { dg-do compile { target c++11 } }
template<typename... Values>
struct tuple
{
static const __SIZE_TYPE__ length = sizeof...(Values);
};
int a0[tuple<>::length == 0? 1 : -1];
int a1[tuple<int>::length == 1? 1 : -1];
int a2[tuple<int, float>::length == 2? 1 : -1];
|
google | android | udlit-suffix-neg | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/udlit-suffix-neg.C | 156 | utf_8 | 8feb854c21c731e45800e46f10b09d5b | // { dg-do compile { target c++11 } }
#include <string>
std::string operator"" 5X(const char*, std::size_t); // { dg-error "expected suffix identifier" }
|
google | android | rv-bitfield | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/rv-bitfield.C | 116 | utf_8 | 9122229630112e85dde4be74e27fcb88 | // { dg-do compile { target c++11 } }
struct A
{
int i : 1;
};
int main()
{
A a;
static_cast<int&&>(a.i);
}
|
google | android | defaulted40 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted40.C | 299 | utf_8 | 473fd9b33bf018433bb89bb7abce2ecf | // DR 1402
// { dg-do compile { target c++11 } }
template <class T> T&& move(T& t);
struct A
{
A(const A&);
};
struct B
{
B(B&&) = delete; // { dg-prune-output "declared" }
};
struct C // { dg-error "deleted" }
{
A a;
B b;
};
extern C c1;
C c2(move(c1)); // { dg-error "deleted" }
|
google | android | constexpr-63265 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-63265.C | 545 | utf_8 | b78047226f0990dcef2a33c9ae385550 | // PR c++/63265
// { dg-do compile { target c++11 } }
#define LSHIFT (sizeof(unsigned int) * __CHAR_BIT__)
template <int lshift>
struct SpuriouslyWarns1 {
static constexpr unsigned int v = lshift < LSHIFT ? 1U << lshift : 0;
};
static_assert(SpuriouslyWarns1<LSHIFT>::v == 0, "Impossible occurred");
template <in... |
google | android | constexpr-using2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-using2.C | 305 | utf_8 | 7a9a83c41c3d2c5f82ac428442905b65 | // PR c++/49520
// { dg-do compile { target c++11 } }
namespace x { void foo(); }
template<typename T>
struct traits
{
static constexpr bool f() { return true; }
static constexpr bool g()
{
using x::foo;
return f() && noexcept(foo());
}
};
template struct traits<int>;
|
google | android | deleted2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/deleted2.C | 104 | utf_8 | d677b798550124a88e6345300f30828a | // PR c++/52707
// { dg-do compile { target c++11 } }
struct A {
int m;
A() = delete;
};
A a = {1};
|
google | android | initlist71 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist71.C | 153 | utf_8 | a33532ad7af196396dbdaa8318439b90 | // PR c++/56930
// { dg-require-effective-target c++11 }
// { dg-options -Wconversion }
int main()
{
int x = sizeof(int);
int y { sizeof(int) };
}
|
google | android | variadic-unresolved | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic-unresolved.C | 284 | utf_8 | 30d5d2ca1010b71be91917305590fe27 | // PR c++/50086
// { dg-do compile { target c++11 } }
template<typename T> void tfun();
template<typename T> void fun1(T);
template<typename... Types> void fun2(Types... args);
int main()
{
fun1(tfun<int>); // ok
fun2(tfun<int>); // error: unresolved overloaded function type
}
|
google | android | constexpr-empty7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C | 648 | utf_8 | 0747afdc6137d0b7079cb129c5f34cd6 | // PR c++/61959
// { dg-do compile { target c++11 } }
template <class Coord> struct BasePoint
{
Coord x, y;
constexpr BasePoint (Coord, Coord) : x (0), y (0) {}
};
template <class T> struct BaseCoord
{
int value;
constexpr BaseCoord (T) : value (1) {}
};
template <class units> struct IntCoordTyped : BaseCoord<... |
google | android | dc1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/dc1.C | 622 | utf_8 | 785a499e3417eea504fae30dbd16a77f | // { dg-do compile { target c++11 } }
struct B {
int i;
B (int _i) : i(_i) { }
~B () { i = 0; }
};
struct A : public B {
A () : B(-1) { }
A (int i) : A() { }
A (double b) : A(static_cast<int>(b)) { }
A (double b, double b2) : A(b2) { }
~A () { }
};
void f_A () { A a(2.0, 3.0); }
struct C {
C () { }
virtua... |
google | android | variadic141 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic141.C | 518 | utf_8 | e59ed046186a8e2ac6689a10b22b2f82 | // Origin: PR c++/53609
// { dg-do compile { target c++11 } }
template<class...I> struct List{ static const bool is_ok = false;};
template<int T> struct Z
{
static const int value = T;
static const int value_square = T * T;
};
template<template<int> class U>
struct List<U<2>, U<3>, U<4>, U<9>> { static const bool... |
google | android | constexpr-ice | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-ice.C | 249 | utf_8 | 5a491076154e43d839d4cb6d72a7f7c1 | // We used to crash on this instead of giving a decent error.
// { dg-do compile { target c++11 } }
struct A { int i; };
struct B {
const A *a;
constexpr B(const A& a): a(&a) { }
};
constexpr B b{A{42}}; // { dg-error "constant|expansion" }
|
google | android | nsdmi-template12 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nsdmi-template12.C | 225 | utf_8 | 6a7ab71ba1c7fa9cc3345da8f9afe903 | // PR c++/58753
// { dg-do compile { target c++11 } }
#include <initializer_list>
template <class T>
struct X {X(std::initializer_list<int>) {}};
template <class zomg>
class T {
X<T> x{1};
};
int main()
{
T<int> t;
}
|
google | android | initlist77 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist77.C | 148 | utf_8 | d5b016047cf8f1ab79bc52ea41141d4c | // PR c++/58651
// { dg-require-effective-target c++11 }
struct A
{
int i;
A(int j) : i{{j}} {} // { dg-error "too many braces" }
};
A a(0);
|
google | android | ref-qual5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/ref-qual5.C | 401 | utf_8 | 32e38316bdc7aa39b2e1811744ca40b7 | // 13.1: ...cannot be overloaded if any of them, but not all, have a
// ref-qualifier.
// { dg-require-effective-target c++11 }
class Y {
void h() &;
void h() const &; // OK
void h() &&; // OK, all declarations have a ref-qualifier
void i() &; // { dg-message "" }
void i() const; ... |
google | android | nullptr25 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/nullptr25.C | 96 | utf_8 | 919c30e34ad54bc368e76f0aa00195fd | // { dg-do compile { target c++11 } }
template<decltype(nullptr)>
struct nt{};
nt<nullptr> x;
|
google | android | constexpr-wstring2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/constexpr-wstring2.C | 249 | utf_8 | bd4e1e431eab6cf6a16ebef510641998 | // PR c++/48570
// { dg-do compile { target c++11 } }
constexpr wchar_t c1 = L"hi"[3]; // { dg-error "out of bound" }
constexpr char16_t c2 = u"hi"[3]; // { dg-error "out of bound" }
constexpr char32_t c3 = U"hi"[3]; // { dg-error "out of bound" }
|
google | android | initlist46 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/initlist46.C | 300 | utf_8 | 5522196cccbc6b3aa3e3d90a513b05ca | // PR c++/48281
// { dg-options "-O2" }
// { dg-do run { target c++11 } }
#include <initializer_list>
typedef std::initializer_list<int> int1;
typedef std::initializer_list<int1> int2;
static int2 ib = {{42,2,3,4,5},{2,3,4,5,1},{3,4,5,2,1}};
int main()
{
return *(ib.begin()->begin()) != 42;
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.