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
inline11
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/inline11.C
653
utf_8
e0f42268d9f567a319e38d1af1fc885e
/* Verify that gnu_inline inlines disregard inlining limits. */ /* { dg-do link } */ /* { dg-options "-O2" } */ extern int foo (int); extern int baz (int); extern inline __attribute__((gnu_inline)) int foo (int x) { int i; if (!__builtin_constant_p (x)) { #define B(n) baz (1##n) + baz (2##n) + baz (3##n) \ ...
google
chromium
pr16693-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/pr16693-1.C
502
utf_8
5464d960c9f938a5db5e2ec3cd1657fd
// PR middle-end/16693 // { dg-do run } // { dg-options "-O2" } extern "C" void abort(); unsigned short ret6666(int) { return 0x66; } typedef enum { a = 0x0, b = 0x1, c = 0x2, d = 0x3, e = 0x4, f = 0x5, g = 0x6, h = 0x7, i = 0x8, j = 0x9, k = 0xa, l = 0xb, m = 0xc, n = 0xd...
google
chromium
range-test-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/range-test-2.C
1,797
utf_8
19ded3e2a50942bf9bcc2f1fc4413e35
// Test fold-const.c (fold_range_test) optimizations. // { dg-do run } */ // { dg-options "-O2" } */ #include <stdlib.h> #include <stdio.h> #include <limits.h> #if (INT_MAX == 2147483647) && (INT_MIN == -2147483648) \ && (SCHAR_MIN == -128) && (SCHAR_MAX == 127) \ && (UCHAR_MIN == 0) && (UCHAR_MAX == 255) #i...
google
chromium
const6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/const6.C
288
utf_8
77ef3f0315a1d75cc03361805c714b79
// 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; }
google
chromium
alias4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/alias4.C
674
utf_8
d1eee6f7ae11e9a1e85a05197e331926
// PR c++/27768 // Alias grouping was losing some may_aliases, causing us to think // the store to w.p was dead. // { dg-do run } // { dg-options "-O2" } int N = 1; struct VA { int *p, *q, *r; VA() : p(), q() {} VA(const VA&) : p(), q() {} ~VA() { if (p) --N; } }; inline void foo(VA, VA, VA) {} struct VB ...
google
chromium
pr30590
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/pr30590.C
528
utf_8
547e4433462a6d07971ee26bc624a941
/* { dg-do run } */ /* { dg-options "-O" } */ struct test { int type; char buffer[4242]; /* should trigger pass-by-reference */ }; int flag = 0; struct test reset (void) { struct test retval; retval.type = 1; return retval; } struct test test (void) { struct test result; result.type = 0; for (int i ...
google
chromium
dtor2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/dtor2.C
164
utf_8
1746b14290a8e8010d79689c8f79394b
// PR c++/42317 // { dg-do link } // { dg-options "-O0" } // { dg-additional-sources "dtor2-aux.cc" } #include "dtor2.h" D::D (int x) : C (x) {} int main () { }
google
chromium
strength-reduce
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/strength-reduce.C
889
utf_8
60be25e48eb621d1ff683d818d13b520
// This testcase was miscompiled on s390x, because strength-reduction // did not see biv in C::foo as used after loop, but it was used // in a REG_EQUAL note. // { dg-do run } // { dg-options "-O2" } extern "C" void abort (void); struct C { int foo (char ch, int offset = __INT_MAX__) const; int bar (int offset, c...
google
chromium
pmf1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/pmf1.C
2,974
utf_8
cf9e1c6c02a4aee1d10b86325166de66
// PR c++/37016 // { dg-do run } // { dg-options "-O2 -Wall" } /* Basic design concept is that WorldObject implements remote method call functionality using the "curiously recurring template pattern" to enable forwarding ...
google
chromium
builtins1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/builtins1.C
444
utf_8
15dd66151b129bfdbe9cd873521b3467
// PR c++/14791 // Test if builtins with FILE * arguments work // { dg-options "-O2 -Wformat" } typedef struct _FILE FILE; FILE *stderr; extern "C" int printf (__const char *__restrict, ...); extern "C" int fprintf (FILE *__restrict, __const char *__restrict, ...); int main () { printf ("%d\n", 1, 1); // { dg-warn...
google
chromium
inline5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/inline5.C
166
utf_8
d6211992cdc6ec155a7621cf706f93dd
// PR c++/12519 // { dg-do compile } // { dg-options "-O" } struct A { ~A(); }; inline const A foo() { A a; return a; } A bar() { return foo(); }
google
chromium
conj2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/conj2.C
448
utf_8
14ee709f09c311be02b0626ca4909c28
// PR target/6043 // This testcase ICEd on IA-64 because emit_group_store // did not handle loading CONCAT from register group // { dg-do compile } struct C { C (double y, double z) { __real__ x = y; __imag__ x = z; } double r () const { return __real__ x; } double i () const { return __imag__ x; } __complex__...
google
chromium
inline6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/inline6.C
237
utf_8
5c520267c44f9ad56a86ee13778463ba
// PR c++/13081 // { dg-options "-O2" } // { dg-final { scan-assembler-not "\n_?_Z3fooIlET_S0_\[: \t\n\]" } } template<typename T> T foo(T); template<typename T> inline T foo(T t) { return t; } void bar (long& l) { l = foo(l); }
google
chromium
reg-stack4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/reg-stack4.C
521
utf_8
c3111968aa68695ef91e764eba7cd46a
// PR target/12900 // This used to fail on x86 because the reg-stack pass // deleted a valid edge. // { dg-do compile } // { dg-options "-mtune=i586 -O2" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } struct array { double data; virtual ~array(); }; double glob; double ext1(double); int nmuons; void track_match(...
google
chromium
init1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/init1.C
68
utf_8
4624dde4c5fc4aac12f23da866696b9c
// PR c++/23171 // { dg-options "-O" } int *p = (int*)(int[1]){0};
google
chromium
nrv5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/nrv5.C
883
utf_8
13481653ab41a707cb4c4eed2199c57f
// PR c++/7279 // Test for the named return value optimization with inlining. // { dg-do run } // { dg-options -O2 } enum E { E0, E1, E2, E3 }; struct S { E s0 : 2; bool s1 : 1, s2 : 1, s3 : 1, s4 : 1, s5 : 1, s6 : 1; S (); void foo (E x); }; S::S() : s1 (true), s2 (false), s0 (E1), s3 (true), s4 (false), s5 ...
google
chromium
nrv14
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/nrv14.C
460
utf_8
f527f51fa4c8b92a4d9374e96752d73a
// PR c++/32992 // { dg-do run } // { dg-options "-O2" } extern "C" void abort (void); struct A { long int a1; long int a2; long int a3; }; struct B { long int f[3]; operator A () { union { long int t[3]; A a; }; for (int i = 0; i < 3; i++) t[i] = f[i]; return a; }...
google
chromium
nrv9
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/nrv9.C
359
utf_8
572452f9faebdba95cc03bfba39f6879
// PR c++/19317 // If we do both NRV and caller-side return slot opt for ga = f() // constructing la sets ga.i to 0 too soon. extern "C" void abort(); struct A { int i; int pad[32]; // force return in memory A(): i(0) {} A(int ia): i(ia) {} }; A ga(42); A f() { A la; if (ga.i != 42) abort(); ret...
google
chromium
preinc1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/preinc1.C
608
utf_8
1451eba24eea82cbd0c1ab87885c0f77
// PR optimization/6086 // { dg-do run } // { dg-options "-O" } extern "C" void abort (void); struct A { A (int x, int y); int a, b; int foo () { return a; } int bar () { return b; } }; struct B { virtual ~B (); virtual A baz () const; }; struct C { A foo () const; B *c; }; A C::foo () const { i...
google
chromium
rtti1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/rtti1.C
265
utf_8
823775aaa479e3ad245323d4d8a2605c
// Test that typeid sees through references even when optimizing. // { dg-do run } // { dg-options "-O2" } #include <typeinfo> struct A { virtual ~A() { } }; class B : public A { }; int main () { B b; A &aref = b; return typeid (aref) != typeid (b); }
google
chromium
crash1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/crash1.C
308
utf_8
2b8e568482a37c0e98a0154aa649f58b
// PR opt/13681 // Here we have an out-of-range array index. We should not abort // trying to resolve the indirection back to an object. struct X { double values[1]; double & foo (const unsigned int index) { return values[index]; } }; void foo() { double d; X h1; h1.foo(1) = d; }
google
chromium
thunk1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/thunk1.C
446
utf_8
423a720c5d6fa9172e277e0cd1c91f34
// PR 6788 // Test that the thunk adjusts the this pointer properly. // { dg-do run } extern "C" void abort (); struct A { virtual void foo() = 0; char large[33*1024]; }; struct B { virtual void foo() = 0; }; struct C : public A, public B { virtual void foo(); }; static C *match; void C::foo() { if (thi...
google
chromium
nrv6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/nrv6.C
378
utf_8
cc4e1f139fd98494395c4313684fa753
// PR c++/9993 // Bug: We were failing to destroy b. // { dg-do run } int c, d; struct Object { Object() { ++c; } Object(const Object&) { ++c; } ~Object() { ++d; } }; Object function() { int i = 0; do { Object b; if (i++ == 2) return b; } wh...
google
chromium
alias1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/alias1.C
363
utf_8
960bd912d3dccb44df0ecdebdfd45b44
// Test that type punning using an anonymous union works with strict aliasing. // { dg-do run } // { dg-options "-O2 -fstrict-aliasing" } extern "C" void abort (); void f (long i) { union { long ui; float uf[20]; }; ui = i; if (uf[0] != 42.0) abort (); } int main () { union U { long i; float...
google
chromium
ptrmem1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/ptrmem1.C
170
utf_8
8ceccf2f02b3f64f372600e32148e146
// { dg-options "-O2" } class QWidget { public: void repaint( bool erase = 1 ); }; void f (void) { typedef void (QWidget::*A)(bool); A b = &QWidget::repaint; }
google
chromium
ptrmem6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/ptrmem6.C
483
utf_8
b0d55030f465e0c394fac453469489e7
// PR tree-opt/18040 // { dg-do compile } // { dg-options "-O3" } int PyObject_IsTrue(); struct object_base { void ptr() const; void ptr1() const; }; struct object : public object_base { typedef void (object::*bool_type)() const; inline operator bool_type() const { return PyObject_IsTrue() ? &object...
google
chromium
pr23454-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/pr23454-2.C
2,203
utf_8
baed609f35505fe831c1cfc4973e2331
/* { dg-do compile } */ /* { dg-options "-O3" } */ typedef unsigned long long int ulonglong; typedef long long int longlong; typedef unsigned int uint32; typedef unsigned int uint; typedef unsigned long int ulong; class Item { public: bool null_value; virtual longlong val_int()=0; }; typedef struct st_tree_element ...
google
chromium
pr17697-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/pr17697-2.C
470
utf_8
c6fc5ae31465965239c674790c73d6fb
// PR tree-optimization/17697 // { dg-do run } // { dg-options "-O2" } extern "C" { extern int strcmp (const char *s, const char *t) throw () __attribute__ ((pure)); } namespace A { extern int strcmp (const char *s, const char *t) throw (); } inline int A::strcmp (const char *s, const char *t) throw () { r...
google
chromium
pr17902
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/pr17902.C
365
utf_8
c4dea16df9a30d5151a70b435783f02b
/* { dg-options "-O3" } */ /* { dg-do compile } */ void foo(); struct A { ~A(){ foo(); } }; struct B { A a; }; void bar() { A a; bool b = false; int i, j; for (j=0; j<i; j++) { if (i) b=true; if (j && i) foo(); if (j && i) i++; } for (j=0; j<i; j++) if ( ...
google
chromium
longbranch2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/longbranch2.C
1,713
utf_8
208df7d46e769a4a8ca96d99dde82ffe
// PR target/11689 // { dg-do compile } // { dg-options "-O3 -funroll-loops -mtune=k6 -fomit-frame-pointer" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } // This used to fail to assemble because of an out-of-range 'loop' instructions. class JKeeper { public: unsigned long a0; }; class EBCOTLut : public JKeeper { ...
google
chromium
fold2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/fold2.C
263
utf_8
8bda53d5b874de63c6fb463b2e63a8f9
// PR optimization/14669 // { dg-do run } // { dg-options "-O2" } extern "C" void abort (void); extern "C" void exit (int); enum ActionType { EE=-1, E0=0, E1, E2 }; int main(void) { ActionType t = E0; if (E1 <= t && t <= E2) abort (); exit (0); }
google
chromium
nrv11
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/nrv11.C
1,289
utf_8
01bc5d5859f1dffb5f5ddc08cc6cbfa7
// PR middle-end/25977 // Bug: We were assuming that the return slot of the current function is // always safe to use as the return slot for another call, because its // address cannot escape. But its address can escape if we perform the // named return value optimization. // { dg-do run } struct A { A( int left...
google
chromium
pr17724-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/pr17724-2.C
437
utf_8
a299f85d974b25dab25e2f0cd5ede318
// PR tree-optimization/17724 // { dg-do compile } // { dg-options "-O2" } namespace N { char *strcpy (char *, const char *); } extern "C" char *strcpy (char *, const char *); inline char *N::strcpy (char *s, const char *t) { return ::strcpy (s, t); } struct S { ~S (); }; int foo (); int main () { S s; int a; ...
google
chromium
eh2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/eh2.C
358
utf_8
4bc90d9400a86fd4bca87067006586da
// PR 6764 // { dg-do run } // { dg-options "-O -fomit-frame-pointer" } extern "C" void abort (); class test { public: test * const me; test () : me(this) { } ~test () { if (me != this) abort (); } }; void x1 () { test w1; throw 1; } void x2 () { test w2; x1 (); } int main (void) { try { x2 ()...
google
chromium
ifcvt1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/ifcvt1.C
237
utf_8
89db632d35bc828ff4165ebbf333e9d4
// { dg-do compile } // { dg-options "-O2 -fnon-call-exceptions" } struct S { ~S () throw () {} }; double bar (); int foo () { S a; int i = 0; double c = bar (); c = c < 0 ? -c : c; if (c <= 1.e-8) i += 24; return i; }
google
chromium
const4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/const4.C
349
utf_8
6b2e1cf4863e58457238c73c49085813
// PR c++/21454 // Test whether A is put into .rodata section on platforms // that have it. // { dg-do compile } const int a[] __attribute__ ((__used__)) = { 0, 1, 2, 3 }; // The MMIX port always switches to the .data section at the end of a file. // { dg-final { scan-assembler-not "\\.data(?!\\.rel\\.ro)" { xfail po...
google
chromium
inline16
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/inline16.C
322
utf_8
c36b321ffd275d0b9d28d12713461fdf
// PR c++/36959 // We shouldn't have to emit fromSlotB just because we need shuf_BZZZ. // { dg-options -O } // { dg-final { scan-assembler-not "_ZL9fromSlotBv" } } static inline int *fromSlotB(void) { static int shuf_BZZZ = 1; return &shuf_BZZZ; } int *p; int main(void) { p = fromSlotB(); return (*p != 1); }...
google
chromium
pr28116
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/pr28116.C
271
utf_8
fab88c0645bc906fcbd7a8fc1c71987b
/* { dg-do compile } */ /* { dg-options "-O3" } */ struct QDateTime { QDateTime addSecs( int secs ) const; int t; }; QDateTime gridToDate(long x) { QDateTime date; date = date.addSecs(1); return date; } void whatsOnAt(long x, long y) { gridToDate(x); }
google
chromium
vt1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/vt1.C
412
utf_8
5dd5ff9bcea02eed1254df7be9cca366
// Test whether vtable for S is not put into read-only section. // { dg-do compile { target fpic } } // { dg-options "-O2 -fpic -fno-rtti" } // { dg-skip-if "requires unsupported run-time relocation" { spu-*-* } { "*" } { "" } } struct S { virtual void vm (void) {}; } x; // { dg-final { scan-assembler-not "section\[^...
google
chromium
enum1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/enum1.C
420
utf_8
58fd998dee334068d9109db8a6d68eee
// Verify that we don't confuse precision and mode for enums. // { dg-do run } // { dg-options "-O" } extern "C" void abort(); enum E { zero = 0, test = 0xbb }; static bool foo(unsigned char *x) { E e = static_cast<E>(*x); switch (e) { case test: return true; default: return false; ...
google
chromium
thunk2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/thunk2.C
504
utf_8
178df7a1f97e8581d95b76bda27dc33d
// PR c++/20206 // { dg-do run } // { dg-options "-O0" } void bar (int x) { asm ("" : : "g" (x)); } struct S { S () {}; virtual ~S () {}; }; struct T { virtual void foo (int) = 0; }; struct U : public S, public T { bool a; U () {} virtual ~U () {} virtual void foo (int x) { switch (x) { ca...
google
chromium
nrv2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/nrv2.C
308
utf_8
360692bdb55de35cb68717ceb6c51fd7
// Test for the named return value optimization, this time with inlining. // { dg-do run } // { dg-options -O2 } int c; int d; struct A { A() { ++c; } A(const A&) { ++c; }; ~A() { ++d; } }; inline A f () { A a; return a; } int main () { { A a = f (); } return !(c == 1 && c == d); }
google
chromium
local1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/local1.C
273
utf_8
83a82f683c2ef38a1d683e0c8055bded
// { dg-options "-O" } struct Outer { struct Inner { virtual bool f() = 0; }; void g(Inner &) const; }; inline void h(const Outer &o) { struct Local : public Outer::Inner { virtual bool f() {}; }; Local l; o.g(l); } void f(Outer &req) { h (req); }
google
chromium
asm1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/asm1.C
275
utf_8
8ec7cd2bb0f2a747c58511cdba0677c9
// PR c++/6747 // { dg-do compile } // { dg-options "-O" } void foo() { union { double d; char c[sizeof(double)]; } tmp; __asm__ ("" : "=m" (tmp.d)); // { dg-bogus "not directly addressable" "double sized union element should be addressible" { xfail xstormy16-*-* } } }
google
chromium
fold3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/fold3.C
289
utf_8
d89445d9cb1f86fe29290ee87eb3d8df
// PR middle-end/15069 // { dg-do run } // { dg-options "-O2" } extern "C" void abort (void); typedef enum { FOUR = 4, FIVE = 5 } direction_t; int main () { direction_t four = FOUR; int flags = (four & 4L) ? (32L | 128L) : 0; flags &= 32L; if (flags == 0) abort (); }
google
chromium
life1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/life1.C
439
utf_8
6bb37c381a7a99231c84a7271bdb70bc
// This testcase did not set up the pic register on IA-32 due // to bug in calculate_global_regs_live EH edge handling. // { dg-do compile { target i?86-*-linux* x86_64-*-linux* } } // { dg-require-effective-target ilp32 } // { dg-require-effective-target fpic } // { dg-options "-O2 -fPIC" } struct A { }; void foo (A...
google
chromium
complex5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/complex5.C
254
utf_8
32b59098b47ea537d04c0f7e24c564c7
// PR 24365 // { dg-do compile } // { dg-options "-O2" } typedef __complex__ double cdouble; inline cdouble to_complex(double r) { cdouble z; __real__ z = r; return z; } cdouble elt_zero() { cdouble a = to_complex(0.0); a+=1.0; return a; }
google
chromium
operator1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/operator1.C
347
utf_8
5778a352c750259fe850421e364893fa
// Tests whether g++ can handle large number of operators // { dg-do compile } #define OP0(n) struct I##n { int i; }; operator I##n (); #define OP1(n) OP0(n) #define OP2(n) OP1(n##0) OP1(n##1) OP1(n##2) OP1(n##3) OP1(n##4) #define OP3(n) OP2(n##0) OP2(n##1) OP2(n##2) OP2(n##3) OP2(n##4) struct S { OP3(0) OP3(1) OP3(...
google
chromium
init2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/init2.C
115
utf_8
c38d4267a5dc18af5254f21903b0176e
// PR middle-end/37414 // { dg-do compile } // { dg-options "-O2 -ffast-math" } double x = 6.0; double y = x * x;
google
chromium
complex2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/complex2.C
307
utf_8
816200fa31222cb98232ecde51a545be
// PR 22022 // { dg-do compile } // { dg-options "-O2" } _Complex float f(); _Complex float g(); _Complex float h()throw(); void i(_Complex float)throw(); void j(void) { _Complex float x = h(); try { try { x = f(); }catch (...) { x = g(); } }catch(...){} i(x); }
google
chromium
mmx1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/mmx1.C
985
utf_8
7f1c978b1a5b6150f90040d9f4d954fb
// PR optimization/4994 // This testcase ICEd because movsi was not supporting direct // mmx -> mmx register moves. // { dg-do compile } // { dg-options "-O2" } // { dg-options "-fno-exceptions -O2 -mmmx -fPIC" { target { { i?86-*-* x86_64-*-* } && { ilp32 && fpic } } } } struct A { unsigned a0; bool a1 () { retur...
google
chromium
nrv8
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/nrv8.C
399
utf_8
77ca072679abe601d84a3ad8e00d99d2
// PR optimization/19531 // forbids NRV on volatile return value. // { dg-options -O2 } // { dg-do run } extern "C" { void abort(); } struct A { int d; A () { d = 123; } A (const A & o) { d = o.d; } A (volatile const A & o) { d = o.d + 2; } }; A bar() { volatile A l; return...
google
chromium
unroll2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/unroll2.C
596
utf_8
b3a23f133e24d6239172db5b22fe6824
// PR tree-opt/28937 // Complete unroll forgot to update the statement usage // which meant we ICEd in add_virtual_operand. // { dg-do compile } // { dg-options "-O2" } class SHA256 { unsigned m_digest; unsigned long long m_count; unsigned char _buffer[64]; static void Transform (unsigned * data); void Wri...
google
chromium
pr7503-1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/pr7503-1.C
1,550
utf_8
90bdbfd9313461944756a9e9f01ce788
// PR c++/7503 // { dg-do run } // { dg-options "-O2" } extern "C" void abort(); void test1a() { int A = 4; int B = 4; (A > B ? A : B) = 1; if (A != 4 || B != 1) abort (); } void test1b() { int A = 3; int B = 5; (A > B ? A : B) = 1; if (A != 3 || B != 1) abort (); } void test1c() { int A...
google
chromium
conj1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/conj1.C
430
utf_8
b879c3972fcf09a0bef4781d973dea10
// PR target/5740 // This testcase ICEd on SPARC -m64 because emit_group_load tried // to move a DFmode register into DImode register directly. // { dg-do compile } // { dg-options "-O2" } struct C { C (double y, double z) { __real__ x = y; __imag__ x = z; } double r () const { return __real__ x; } double i () c...
google
chromium
pr24665
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/pr24665.C
520
utf_8
be8e681aa55392ab8d418d91b64c3d0a
// { dg-do compile } // { dg-options "-O2" } typedef unsigned long T; typedef volatile T* const hwreg_t; struct RegisterLayout { T intmask; }; struct Controller_t { Controller_t(); inline void disableInterrupt() { *mpMaskRegister = 0; }; static hwreg_t mpMaskRegister; }; extern cha...
google
chromium
cfg5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/cfg5.C
561
utf_8
034e3a731866a70219217679e6573190
/* { dg-do compile } */ /* { dg-options "-O2 -fnon-call-exceptions -ffast-math -fno-gcse" } */ class One { public: One () { e[0] = e[1] = 0.0; } double e[2]; }; template <class T> class Two { public: Two(); private: T *data; int arraySize; }; template <class T> Two<T>::Two() { data = new T[arrayS...
google
chromium
complex3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/complex3.C
338
utf_8
35877c00cc48159fa11634f3321a6100
// PR 22022 // { dg-do compile } // { dg-options "-O2" } _Complex float f(); _Complex float g(); _Complex float h()throw(); void i(float)throw(); float j(void) { _Complex float x = h(); try { try { x = f(); }catch (...) { x += g(); } }catch(...){} i(__builtin_crealf(x)+__buil...
google
chromium
pr32383
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/pr32383.C
228
utf_8
e2528624f74d72e058180aa73e89ab6b
// { dg-do compile } // { dg-options "-O -ffast-math" } struct A { ~A(); }; double& foo(); inline void bar (double d) { foo() /= d; } void baz() { A a; bar(2); }
google
chromium
pr23454
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/pr23454.C
512
utf_8
6b44bd46dbabf935a497942dd88a002b
/* PR rtl-optimization/23454 */ /* { dg-do compile } */ /* { dg-options "-O2" } */ void foo (); int a, b; char c; long long d, e; static inline int bar (const long long s, const long long t) { return ((s < t) ? -1 : s > t ? 1 : 0); } int fn (); int f; void baz (int x) { long long g = fn (); if (f) { ...
google
chromium
rtti2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/opt/rtti2.C
314
utf_8
86f37428153f2503110eee8bbb401a58
// { dg-do compile } // { dg-options "-O2" } // We used to ICE in compare_values as the types for a comparison // were not the same kind of types. struct class1 { virtual ~class1 (); }; struct class2 : class1 { }; void f(class1 * oo) { class2 * oj = dynamic_cast <class2 *>(oo) ; if (oj) delete oo; }
google
chromium
hidden-class3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class3.C
192
utf_8
0f80d6d420969bf03406748b683c92d5
// { dg-do compile } class A { friend class B; class B; B *b; };
google
chromium
ns1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/ns1.C
152
utf_8
72c3a9b17a32af0585fa3bf9d370c39d
// PR c++/12862 typedef int Thingo; namespace A { void Thingo(); } void A::Thingo() { ; } int main() { A::Thingo(); return 0; }
google
chromium
friend11
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/friend11.C
400
utf_8
5c64f9c92441d9822e5272487e11d168
/* PR c++/30917 */ /* This used to ICE */ /* { dg-do "compile" } */ class QGList; unsigned count() { class QGListIterator { friend class QGList; QGListIterator( const QGList & ); // OK, finds ::QGList. }; return 0; } // This is valid. unsigned count2() { class QGList2; class QGListIterator2 { f...
google
chromium
using5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/using5.C
355
utf_8
e6b9eddad8d672688c883ca8af446a66
// { dg-do compile } // PR c++/10554: ICE for member using declaration with failed // scope name lookup. template <typename> struct A { typedef A X; void foo(); }; template <typename T> struct B : A<T> { using X::foo; // { dg-error "declared|nested-name-specifier|non-member" } };
google
chromium
koenig10
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/koenig10.C
129
utf_8
668e482efb2099032387b8bb3bc1b61a
// Test for proper handling of class-scope enums. struct A { enum E { e }; friend void f (E); }; int main() { f(A::e); }
google
chromium
hidden-class13
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class13.C
301
utf_8
a4858648c41c9b0f1ca44a59f37fd567
// Origin PR c++/36019 // { dg-do compile } struct F { static const int x = 0; }; struct B { template <typename B> struct C { static int f () { return B::x; } }; }; int main () { int j = B::C<F>::f (); return 0; }
google
chromium
crash2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/crash2.C
189
utf_8
6fc9e98dd31a974c79f311f71bfe2a82
// PR c++/14086 struct ClassA { ClassA(); }; struct ClassB { enum Enum {ClassB}; // { dg-error "" } ClassA key; ClassB(); virtual ~ClassB(); }; ClassB::ClassB() { }
google
chromium
hidden-temp-class11
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-temp-class11.C
253
utf_8
4ccdb617ff78279d83f998edb37cd393
// { dg-do compile } namespace N { class A { template <class T> friend class B; }; } using N::B; // { dg-error "declared" }
google
chromium
using
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/using.C
294
utf_8
e787b658f008402e539125d8744f57b8
// { dg-do compile } struct X { }; struct Y { }; struct Z { }; struct Base { X f() { return X(); } Y f() const { return Y(); } }; struct Derived : Base { using Base::f; Z f(int) { return Z(); } }; int main() { Derived d; X x = d.f(); // { dg-bogus "Y" "" } }
google
chromium
name-clash5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/name-clash5.C
362
utf_8
8fde82d1ece56dc506b9b499c0bd4a81
// { dg-do compile } // C++ Standard, 3.3, clause 4: // "[Note: a namespace name or a class template name must be unique in its // declarative region (7.3.2, clause 14). ]" namespace N { // { dg-error "previous declaration" } } class N; // { dg-error "redeclared" }
google
chromium
ambig4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/ambig4.C
262
utf_8
20277ca7e96e342bdcbe0d7dd189cf10
// PR c++/13377 // { dg-do compile } namespace N { int i; // { dg-error "i" } } int i; // { dg-error "i" } using namespace N; void foo() { i; } // { dg-error "ambiguous" }
google
chromium
scoped1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/scoped1.C
422
utf_8
7f5cd88f36ee85ad8858de6c3ee35d51
// Test that explicitly scoped references to static members work even if // they belong to an inaccessible base. struct A { static int i1; int i2; // { dg-error "inaccessible" "" } static void f1 (); void f2 (); }; struct B: private A { }; struct C: public B { void g () { ::A::i1 = 1; ::A::i2 = 1;...
google
chromium
two-stage4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/two-stage4.C
418
utf_8
1b8c33d621d2aea028aa0ce6b0b904fe
template<class T> struct wrap {}; template<typename T> bool& operator==(wrap<T>, wrap<T>); template<typename T> void g(T, wrap<wrap<int> > x) { bool& b = x == x; // { dg-bogus "invalid initialization of reference" "" { xfail *-*-*} } } template<typename T> int& operator==(wrap<wrap<T> >, wrap<wrap<T> >); void h() { ...
google
chromium
koenig4
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/koenig4.C
398
utf_8
634eca78a66aff86cb1d96384411430c
// { dg-do compile } // Incorrect koenig lookup struct A {}; struct B { static void foo(); static void bar(const A &); }; void bar(const A &){} void B::foo () { A a; bar (a); }
google
chromium
friend13
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/friend13.C
88
utf_8
d5d8f8802b06ec8909b759d46c8931c7
// PR c++/37558 class Foo { friend class Bar; friend void func(const class Bar*); };
google
chromium
delete1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/delete1.C
295
utf_8
d9678387006e999bc9d29de93e894ef7
// PR c++/2136 // Test that overloaded op new and delete don't prevent us from using the // global versions with an explicit scope. #include <stddef.h> struct A { void *operator new (size_t, float); void operator delete (void *, float); }; int main () { A *p = ::new A; ::delete p; }
google
chromium
koenig12
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/koenig12.C
305
utf_8
b4c9a3125082aac3aa6b866492a89640
// PR c++/41305 // We got into infinite recursion instantiating the B<U> series. template <class T> struct A { }; template <class T, class U = A<T> > struct B; template <class T> struct C { }; template <class T, class U> struct B: C<B<U> > { friend void f(B) { } }; B<int> b; int main() { f(b); }
google
chromium
class-member-2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/class-member-2.C
102
utf_8
150d0e731cb43b0a2d8a3416484aa2a0
template <typename T> struct A { void foo () const {} char A; }; void bar() { A<void>().foo(); }
google
chromium
crash3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/crash3.C
400
utf_8
2d694db02bac816df7c429ac8b59c18f
// { dg-do compile } // Contributed by Wolfgang Wieser <wwieser at gmx dot de> // PR c++/15967: ICE with ambiguous operator new typedef __SIZE_TYPE__ size_t; struct A { void *operator new(size_t s){} }; // { dg-error "operator new" } struct B { void *operator new(size_t s){} }; // { dg-error "operator new" } stru...
google
chromium
friend15
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/friend15.C
211
utf_8
fae4eaba1e6de9479d99c7509ff74578
// Origin: PR c++/35109 // { dg-do compile } void foo() { struct A { friend class B; }; B::B() {} // { dg-error "has not been declared" } // { dg-error "expected" "expected" { target *-*-* } 10 } }
google
chromium
name-clash3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/name-clash3.C
168
utf_8
81599e15173d111c32e196e35a6bc5ed
// { dg-do compile } // PR c++/12102 struct A { struct C {} C; }; struct B : A { struct C {} C; };
google
chromium
using22
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/using22.C
260
utf_8
ddb95e89fa0dec0bbd065160a0fd5f62
// PR c++/39786 namespace A { char (*f(char *p))[13] { return 0; } } namespace B { namespace C { char (*f(int p))[42] { return 0; } } using namespace C; } using namespace B; using namespace A; char x[sizeof *::f(0) == 42 ? 1 : -1];
google
chromium
friend1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/friend1.C
231
utf_8
f095afdbf961d01e5ac006fff4dbda02
// { dg-do compile } // PR c++/9970: In-class friend function definition after // declaration lexical scope problem. void f(); struct X { enum { k = 1 }; friend void f() { char a[k]; } };
google
chromium
member1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/member1.C
109
utf_8
87fc629e5c4d461f8b0b8d07b9e85a50
// PR c++/14186 struct Base { enum { Derived }; }; class Derived : public Base { Derived(); };
google
chromium
using15
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/using15.C
153
utf_8
dc21e16250c98c89c5aa0d520799c564
// PR c++/27933 // { dg-do compile } template<int> struct A { int i; A() { using i; } // { dg-error "nested-name-specifier|declared" } }; A<0> a;
google
chromium
builtin3
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/builtin3.C
280
utf_8
f7071ebb383c4bfa6e3d7a62fe5aeeeb
// { dg-do compile } // PR 31749: ICE with redeclaration of builtin namespace std { union abort; } void abort(); using std::abort;
google
chromium
ns2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/ns2.C
113
utf_8
8fad00e146fe0525b4a78080a95a7ca8
// PR c++/18161 namespace m { namespace n { } } namespace n { } namespace o { namespace n = ::m::n; }
google
chromium
hidden-class7
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-class7.C
239
utf_8
368a0be43f3f0f93b821911860114e96
// { dg-do compile } class A { friend class B; }; class C { friend class B; }; B *b; // { dg-error "expected" }
google
chromium
used-before-declaration
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/used-before-declaration.C
183
utf_8
484cce6ae499098e15620d91582e9470
void f() { g(); } // { dg-error "not declared" "" } void g() { }
google
chromium
anon5
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/anon5.C
340
utf_8
f6ed60ec36721bb21df4b4b0a445bcff
// PR c++/28409 // shouldIbevisible should be emitted because it's an extern "C" decl with // external linkage, even though it's in the anonymous namespace. namespace { extern "C" int shouldIbevisible() { return 0; } } namespace t { extern "C" int shouldIbevisible(void); } int main(void) { return t::sh...
google
chromium
exception1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/exception1.C
491
utf_8
9c3013e710b3fee0c4c57b37e6edc002
/* PR 2743 */ /* { dg-do compile } */ namespace ns { class Exception { }; } namespace ns { class Test { public: inline Test() throw( Exception ); inline Test(int n ) throw( Exception ); private: int i; }; } // This line used to fail because Exception wasn't looked up in the // rig...
google
chromium
crash7
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/crash7.C
112
utf_8
ab5c5a242a635b12bd7f567d048700f4
// PR c++/35323 // { dg-options "" } void foo(int); void bar() { foo(1r); // { dg-error "not supported" } }
google
chromium
struct2
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/struct2.C
95
utf_8
f7cc5bba605998b587366c1cb499ac4f
// PR c++/14510 struct c {}; namespace A { int c(struct c*req); } int A::c(struct c*req) {}
google
chromium
crash6
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/crash6.C
244
utf_8
ed885784cc184f53bc0506c07dec604c
// { dg-do compile } // PR c++/18652: ICE redeclaring variable as template. int A; // { dg-error "previous declaration" } template<int> struct A; // { dg-error "different kind of symbol" }
google
chromium
friend12
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/friend12.C
162
utf_8
633091cdd3ac488ec10917d42e7f1b0c
// PR c++/34912 void foo() { struct A { friend void bar(); // { dg-error "without prior declaration" } }; bar(); // { dg-error "not declared" } }
google
chromium
hidden-temp-class10
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/hidden-temp-class10.C
284
utf_8
50ab8034359fc3eea96c1920bf38c853
// { dg-do compile } namespace N { class A { template <class T> friend class B; }; } template <class T> class N::B { // { dg-error "not name a class" } };
google
chromium
using21
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/using21.C
193
utf_8
de5435c6fdaa42a8c943f90be9019ea7
// PR c++/40799 namespace Bar { typedef int A; } class CollectionDeleteGuard { public: CollectionDeleteGuard(int); }; CollectionDeleteGuard::CollectionDeleteGuard(int) { using Bar::A; }
google
chromium
friend14
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/friend14.C
277
utf_8
12ea946975f9ac153ba628a157f55a5a
// PR c++/35109 struct C; void f() { struct A { friend struct B; friend struct C; void g() { B *b; // { dg-error "not declared" } C* c; // OK, finds ::C } }; C *c; // OK, finds ::C struct B {}; B *b; // OK, now it isn't hidden }
google
chromium
scope-operator1
.C
native_client/nacl-gcc/gcc/testsuite/g++.dg/lookup/scope-operator1.C
306
utf_8
a0c29cb4b5f7577e6f70badabcf54df5
/* PR c++/250 */ /* { dg-do compile } */ template <class T> void Bar(T *p) { } template <class T> class Foo { public: Foo(T *p) { Bar(p); } // The global scope operator wasn't respected in this case under gcc 3.0 void Bar(T *p) { ::Bar<T>(p); } }; int main() { double* d; Foo<double> f(d); }