diff options
author | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-20 23:01:12 +0000 |
---|---|---|
committer | mrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-20 23:01:12 +0000 |
commit | e1dfbe3090ccf6cfbc7275cfdfa38f71647de3ed (patch) | |
tree | 8c98991ecdce73acfe22e53e466031d83b2524c1 /gcc/testsuite/g++.dg | |
parent | 6f44b17da48973c9fe4f7b690879dd90bf8a8c90 (diff) | |
parent | 1b2bf75690af8115739ebba710a44d05388c7a1a (diff) | |
download | gcc-e1dfbe3090ccf6cfbc7275cfdfa38f71647de3ed.tar.gz |
Merge in trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/wide-int@202802 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg')
39 files changed, 1335 insertions, 14 deletions
diff --git a/gcc/testsuite/g++.dg/abi/main.C b/gcc/testsuite/g++.dg/abi/main.C new file mode 100644 index 00000000000..4c5f1ea213c --- /dev/null +++ b/gcc/testsuite/g++.dg/abi/main.C @@ -0,0 +1,24 @@ +/* { dg-do compile } */ + +/* Check if entry points get implicit C linkage. If they don't, compiler will + * error on incompatible declarations */ + +int main(); +extern "C" int main(); + +#ifdef __MINGW32__ + +int wmain(); +extern "C" int wmain(); + +int DllMain(); +extern "C" int DllMain(); + +int WinMain(); +extern "C" int WinMain(); + +int wWinMain(); +extern "C" int wWinMain(); + +#endif + diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-38.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-38.C new file mode 100644 index 00000000000..bc98737b849 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-38.C @@ -0,0 +1,41 @@ +// PR c++/58435 +// { dg-do compile { target c++11 } } + +template<typename T, typename U> +struct same { static const bool value = false; }; +template<typename T> +struct same<T, T> { static const bool value = true; }; + +template <template <typename> class F, typename T> struct apply +{ typedef F<T> type; }; +template <template <typename> class F, typename T> struct applyc +{ typedef const F<T> type; }; +template <template <typename> class F, typename T> struct applyv +{ typedef volatile F<T> type; }; +template <template <typename> class F, typename T> struct applycv +{ typedef const volatile F<T> type; }; + +template <typename T> using map = T; +template <typename T> using mapc = const T; +template <typename T> using mapv = volatile T; +template <typename T> using mapcv = const volatile T; + +static_assert(same<apply<map, int>::type, int>::value, ""); +static_assert(same<apply<mapc, int>::type, const int>::value, ""); +static_assert(same<apply<mapv, int>::type, volatile int>::value, ""); +static_assert(same<apply<mapcv, int>::type, const volatile int>::value, ""); + +static_assert(same<applyc<map, int>::type, const int>::value, ""); +static_assert(same<applyc<mapc, int>::type, const int>::value, ""); +static_assert(same<applyc<mapv, int>::type, const volatile int>::value, ""); +static_assert(same<applyc<mapcv, int>::type, const volatile int>::value, ""); + +static_assert(same<applyv<map, int>::type, volatile int>::value, ""); +static_assert(same<applyv<mapc, int>::type, const volatile int>::value, ""); +static_assert(same<applyv<mapv, int>::type, volatile int>::value, ""); +static_assert(same<applyv<mapcv, int>::type, const volatile int>::value, ""); + +static_assert(same<applycv<map, int>::type, const volatile int>::value, ""); +static_assert(same<applycv<mapc, int>::type, const volatile int>::value, ""); +static_assert(same<applycv<mapv, int>::type, const volatile int>::value, ""); +static_assert(same<applycv<mapcv, int>::type, const volatile int>::value, ""); diff --git a/gcc/testsuite/g++.dg/cpp0x/auto9.C b/gcc/testsuite/g++.dg/cpp0x/auto9.C index 190bfa6e8f0..f357f2b9663 100644 --- a/gcc/testsuite/g++.dg/cpp0x/auto9.C +++ b/gcc/testsuite/g++.dg/cpp0x/auto9.C @@ -117,8 +117,8 @@ template <auto V = 4> struct G {}; // { dg-error "auto" } template <typename T> struct H { H (); ~H (); }; H<auto> h; // { dg-error "invalid" } -void qq (auto); // { dg-error "auto" } -void qr (auto*); // { dg-error "auto" } +void qq (auto); // { dg-warning "auto" } +void qr (auto*); // { dg-warning "auto" } // PR c++/46145 typedef auto autot; // { dg-error "auto" } diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this17.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this17.C new file mode 100644 index 00000000000..2386e6b1eb8 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this17.C @@ -0,0 +1,21 @@ +// PR c++/58481 +// { dg-require-effective-target c++11 } + +struct Test { + template<typename... Args> inline void triggerTest (Args&&... fargs) { } +}; + +struct TestPickled : Test { + template<typename... Args> void triggerTest (Args&&... fargs) { + [=](Args... as) { + Test::triggerTest (as...); + } (); + } +}; + +int main() +{ + TestPickled test; + test.triggerTest (); + return 0; +} diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic2.C new file mode 100644 index 00000000000..fab1f6ca6ac --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic2.C @@ -0,0 +1,57 @@ +// { dg-do run { target c++11 } } + +int g() { return 0; } +template <class T, class... U> +int g(T t, U... u) +{ + return t + g(u...); +} + +template <class... T> +int f1(T... t) +{ + return [t...] { + return g(t...); + }(); +} + +template <class... T> +int f2(T... t) +{ + return [&t...] { + return g(t...); + }(); +} + +template <class... T> +int f3(T... t) +{ + return [=] { + return g(t...); + }(); +} + +template <class... T> +int f4(T... t) +{ + return [&] { + return g(t...); + }(); +} + +#define assert(E) do { if (!(E)) __builtin_abort(); } while(0) +int main() +{ + assert (f1() == 0); + assert (f2() == 0); + assert (f3() == 0); + assert (f4() == 0); + assert (f1(42) == 42); + assert (f2(42) == 42); + assert (f3(42) == 42); + assert (f4(42) == 42); + assert (f1(1,2,3) == 6); + assert (f2(1,2,3) == 6); + assert (f3(1,2,3) == 6); + assert (f4(1,2,3) == 6); +} diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/omp-fesdr.C b/gcc/testsuite/g++.dg/debug/dwarf2/omp-fesdr.C new file mode 100644 index 00000000000..b3b65e91888 --- /dev/null +++ b/gcc/testsuite/g++.dg/debug/dwarf2/omp-fesdr.C @@ -0,0 +1,36 @@ +/* { dg-do compile } */ +/* { dg-require-effective-target fopenmp } */ +/* { dg-options "-g -fopenmp -gdwarf-2 -femit-struct-debug-reduced" } */ + +struct aa +{ + int a; +}; + +int +f7 (void) +{ + int v7i = 6, v7j = 7, v7k = 9, v7l = 0, v7n = 0, v7o = 1; + + #pragma omp parallel + { + #pragma omp master + v7o++; + #pragma omp for private (v7i) firstprivate (v7k) reduction (+:v7l) + for (v7n = 0; v7n < 3; v7n++) + { + int v7m = v7j + v7k; + v7i = 8; + v7l++; + } + } + + return v7i + v7j + v7k + v7l + v7n; +} + +int +main (void) +{ + f7 (); + return 0; +} diff --git a/gcc/testsuite/g++.dg/debug/ra1.C b/gcc/testsuite/g++.dg/debug/ra1.C new file mode 100644 index 00000000000..b6f7bfc588d --- /dev/null +++ b/gcc/testsuite/g++.dg/debug/ra1.C @@ -0,0 +1,77 @@ +/* { dg-options "-fcompare-debug" } */ + +enum signop { SIGNED, UNSIGNED }; +enum tree_code { FOO, BAR }; +enum tree_code_class { tcc_type, tcc_other }; +extern enum tree_code_class tree_code_type[]; + +struct tree_base { + enum tree_code code : 16; + unsigned unsigned_flag : 1; +}; + +struct tree_def { + tree_base base; + struct { + int precision; + } type_common; +}; + +typedef tree_def *tree; + +struct storage_ref +{ + storage_ref (const long *, unsigned int, unsigned int); + + const long *val; + unsigned int len; + unsigned int precision; +}; + +inline storage_ref::storage_ref (const long *val_in, + unsigned int len_in, + unsigned int precision_in) + : val (val_in), len (len_in), precision (precision_in) +{ +} + +struct hwi_with_prec +{ + long val; + unsigned int precision; + signop sgn; +}; + +inline storage_ref +decompose (long *scratch, unsigned int precision, + const hwi_with_prec &x) +{ + scratch[0] = x.val; + if (x.sgn == SIGNED || x.val >= 0 || precision <= sizeof (long) * 8) + return storage_ref (scratch, 1, precision); + scratch[1] = 0; + return storage_ref (scratch, 2, precision); +} + +extern void tree_class_check_failed (int) __attribute__ ((__noreturn__)); + +inline tree +tree_class_check (tree t, const enum tree_code_class cls, int x) +{ + if (tree_code_type[t->base.code] != cls) + tree_class_check_failed (x); + return t; +} + +tree wide_int_to_tree (tree, const storage_ref &); + +tree +build_int_cstu (tree type, unsigned long val) +{ + hwi_with_prec x; + x.val = val; + x.precision = tree_class_check (type, tcc_type, 1)->type_common.precision; + x.sgn = (signop) tree_class_check (type, tcc_type, 2)->base.unsigned_flag; + long scratch[2]; + return wide_int_to_tree (type, decompose (scratch, x.precision, x)); +} diff --git a/gcc/testsuite/g++.dg/ext/pr57735.C b/gcc/testsuite/g++.dg/ext/pr57735.C new file mode 100644 index 00000000000..0eb95006dda --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/pr57735.C @@ -0,0 +1,145 @@ +/* { dg-do compile { target arm*-*-* } } */ +/* { dg-options "-march=armv5te -marm -mtune=xscale -mfloat-abi=soft -O1" } */ + +typedef unsigned int size_t; +__extension__ +typedef long long int int64_t; +namespace WTF { + template<typename T> class RefPtr { + public: + inline T* operator->() const { return m_ptr; } + T* m_ptr; + }; +} +using WTF::RefPtr; +namespace JSC { + class ExecState; + class JSString; + typedef int64_t EncodedJSValue; + class JSValue { + public: + static EncodedJSValue encode(JSValue); + JSString* toString(ExecState*) const; + }; +} +typedef unsigned char LChar; + typedef short unsigned int UChar; +namespace WTF { + template<typename T, size_t inlineCapacity = 0> + class Vector { + public: + template<typename U> bool tryAppend(const U*, size_t); + }; +} +using WTF::Vector; +namespace WTF { +template<typename CharType> inline bool isASCIIDigit(CharType c) +{ +} +template<typename CharType> inline bool isASCIIHexDigit(CharType c) +{ + return isASCIIDigit(c) || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f'); +} + class StringImpl; +} +using WTF::StringImpl; +namespace WTF { +class StringImpl { +public: + unsigned length() const { return m_length; } + unsigned m_length; +}; +} +namespace JSC { + class Register { + }; +class UString { +public: + unsigned length() const + { + return m_impl->length(); + } + const LChar* characters8() const + { + } + RefPtr<StringImpl> m_impl; +}; + class ExecState : private Register { + public: + JSValue argument(size_t argument) + { + } + }; + class JSCell { + }; + class JSString : public JSCell { + public: + const UString& value(ExecState*) const; + }; +class JSStringBuilder { +public: + void append(const UChar u) + { + m_okay &= buffer16.tryAppend(&u, 1); + } + Vector<UChar, 64> buffer16; + bool m_okay; +}; +template <typename T> +class Lexer { +public: + static unsigned char convertHex(int c1, int c2); +}; +} +namespace WTF { +namespace Unicode { + int UTF8SequenceLength(char); + int decodeUTF8Sequence(const char*); +} +} +using namespace WTF; +using namespace Unicode; +namespace JSC { +template <typename CharType> +static JSValue decode(ExecState* exec, const CharType* characters, int length, const char* doNotUnescape, bool strict) +{ + JSStringBuilder builder; + int k = 0; + UChar u = 0; + while (k < length) { + const CharType* p = characters + k; + CharType c = *p; + if (c == '%') { + int charLen = 0; + if (k <= length - 3 && isASCIIHexDigit(p[1]) && isASCIIHexDigit(p[2])) { + const char b0 = Lexer<CharType>::convertHex(p[1], p[2]); + const int sequenceLen = UTF8SequenceLength(b0); + if (sequenceLen && k <= length - sequenceLen * 3) { + charLen = sequenceLen * 3; + char sequence[5]; + if (charLen != 0) { + const int character = decodeUTF8Sequence(sequence); + if (character < 0 || character >= 0x110000) + charLen = 0; + else if (character >= 0x10000) { + builder.append(static_cast<UChar>(0xD800 | ((character - 0x10000) >> 10))); + } else + u = static_cast<UChar>(character); + } + } + } + } + } +} +static JSValue decode(ExecState* exec, const char* doNotUnescape, bool strict) +{ + UString str = exec->argument(0).toString(exec)->value(exec); + return decode(exec, str.characters8(), str.length(), doNotUnescape, strict); +} +EncodedJSValue globalFuncDecodeURI(ExecState* exec) +{ + static const char do_not_unescape_when_decoding_URI[] = + "#$&+,/:;=?@"; + return JSValue::encode(decode(exec, do_not_unescape_when_decoding_URI, true)); +} +} diff --git a/gcc/testsuite/g++.dg/init/delete1.C b/gcc/testsuite/g++.dg/init/delete1.C index 698b127714a..304dca1caf9 100644 --- a/gcc/testsuite/g++.dg/init/delete1.C +++ b/gcc/testsuite/g++.dg/init/delete1.C @@ -1,7 +1,7 @@ // PR c++/19811 -class C; // { dg-error "forward" } +class C; // { dg-warning "forward" } void foo(void *p) { - delete [] ((C*)p) ; // { dg-error "" } + delete [] ((C*)p) ; // { dg-warning "problem|incomplete" } } diff --git a/gcc/testsuite/g++.dg/ipa/devirt-11.C b/gcc/testsuite/g++.dg/ipa/devirt-11.C index b888935ff30..d30d56cff24 100644 --- a/gcc/testsuite/g++.dg/ipa/devirt-11.C +++ b/gcc/testsuite/g++.dg/ipa/devirt-11.C @@ -46,5 +46,4 @@ bar () and two to fn3. While doing so the new symbol for fn2 needs to be introduced. */ /* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target" 3 "inline" } } */ -/* { dg-final { scan-ipa-dump-times "and turned into root of the clone tree" 1 "inline" } } */ /* { dg-final { cleanup-ipa-dump "inline" } } */ diff --git a/gcc/testsuite/g++.dg/ipa/devirt-16.C b/gcc/testsuite/g++.dg/ipa/devirt-16.C new file mode 100644 index 00000000000..85567867ff1 --- /dev/null +++ b/gcc/testsuite/g++.dg/ipa/devirt-16.C @@ -0,0 +1,39 @@ +/* We shall devirtualize to unreachable. No anonymous type method should surivve + reachability. */ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-ipa-whole-program" } */ +namespace { +class B { +public: + virtual int foo(void) +{ + return 0; +} +}; +class A : public B { +public: + virtual int foo(void) +{ + return 1; +} +}; +} +class B *b; +main() +{ + int c; + if (c) + { + class A a; + a.foo(); + class B b; + b.foo(); + } + return b->foo(); +} + +/* { dg-final { scan-ipa-dump "Devirtualizing" "whole-program"} } */ +/* { dg-final { scan-ipa-dump "builtin_unreachable" "whole-program"} } */ +/* { dg-final { scan-ipa-dump-not "A::foo" "whole-program"} } */ +/* { dg-final { scan-ipa-dump-not "A::foo" "whole-program"} } */ +/* { dg-final { cleanup-ipa-dump "whole-program" } } */ diff --git a/gcc/testsuite/g++.dg/ipa/devirt-17.C b/gcc/testsuite/g++.dg/ipa/devirt-17.C new file mode 100644 index 00000000000..9edfd73af56 --- /dev/null +++ b/gcc/testsuite/g++.dg/ipa/devirt-17.C @@ -0,0 +1,44 @@ +/* We shall devirtualize to B::foo since it is the only live candidate of an + anonymous type. */ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-ipa-whole-program" } */ +namespace { +class B { +public: + virtual int foo(void) +{ + return 0; +} +}; +class A : public B { +public: + virtual int foo(void) +{ + return 1; +} +}; +} +class B *b; +void get_me_lost (void *); +main() +{ + int c; + if (c) + { + class A a; + a.foo(); + } + else + { + b = new (class B); + b->foo(); + get_me_lost ((void *)&b); + } + return b->foo(); +} + +/* { dg-final { scan-ipa-dump "Devirtualizing" "whole-program"} } */ +/* { dg-final { scan-ipa-dump-not "builtin_unreachable" "whole-program"} } */ +/* { dg-final { scan-ipa-dump "B::foo" "whole-program"} } */ +/* { dg-final { scan-ipa-dump-not "A::foo" "whole-program"} } */ +/* { dg-final { cleanup-ipa-dump "whole-program" } } */ diff --git a/gcc/testsuite/g++.dg/ipa/devirt-18.C b/gcc/testsuite/g++.dg/ipa/devirt-18.C new file mode 100644 index 00000000000..dbbe597c92c --- /dev/null +++ b/gcc/testsuite/g++.dg/ipa/devirt-18.C @@ -0,0 +1,37 @@ +/* We shall devirtualize to unreachable. No anonymous type method should surivve + reachability. */ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-ssa" } */ +namespace { +class B { +public: + virtual int foo(void) +{ + return 0; +} +}; +class A : public B { +public: + virtual int foo(void) +{ + return 1; +} +}; +} +class B *b; +main() +{ + if (0) + { + class A a; + a.foo(); + class B b; + b.foo(); + } + return b->foo(); +} + +/* { dg-final { scan-tree-dump-not "A::foo" "ssa"} } */ +/* { dg-final { scan-tree-dump-not "B::foo" "ssa"} } */ +/* { dg-final { scan-tree-dump "builtin_unreachable" "ssa"} } */ +/* { dg-final { cleanup-tree-dump "ssa" } } */ diff --git a/gcc/testsuite/g++.dg/ipa/pr58371.C b/gcc/testsuite/g++.dg/ipa/pr58371.C new file mode 100644 index 00000000000..00cfbb831fc --- /dev/null +++ b/gcc/testsuite/g++.dg/ipa/pr58371.C @@ -0,0 +1,204 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + + +typedef int size_t; +namespace { +template < typename > struct char_traits; +} +namespace __gnu_cxx { +template < typename > class new_allocator { +}; +} +namespace std { +template < typename _Tp > class allocator:__gnu_cxx::new_allocator < _Tp > { +public: + size_t size_type; + typedef _Tp & const_reference; + template < typename > struct rebind { + typedef allocator other; + }; +}; +} +namespace __gnu_cxx { +template < typename _Alloc > struct __alloc_traits { + typedef typename _Alloc::const_reference const_reference; + template < typename _Tp > struct rebind { + typedef typename _Alloc::template rebind < _Tp >::other other; + }; +}; +} +namespace std { +struct __numeric_limits_base { +}; +template < typename _Tp > struct numeric_limits:__numeric_limits_base { + static _Tp max () { + } +}; +template < typename _Tp, typename _Alloc > struct _Vector_base { + typedef typename __gnu_cxx::__alloc_traits < _Alloc >::template rebind < + _Tp >::other _Tp_alloc_type; +}; +template < typename _Tp, typename _Alloc = std::allocator < _Tp > >class vector:_Vector_base < _Tp, + _Alloc + > { + typedef _Vector_base < _Tp, _Alloc > _Base; + typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; + typedef __gnu_cxx::__alloc_traits < _Tp_alloc_type > _Alloc_traits; +public: + _Tp value_type; + typedef typename _Alloc_traits::const_reference const_reference; + typedef size_t size_type; + size_type size () { + } const_reference operator[] (size_type) { + } +}; +template < typename _CharT, typename = +char_traits < _CharT > >class basic_ostream; +typedef basic_ostream < int >ostream; +class ios_base { +}; +template < typename, typename > class basic_ios:ios_base { +}; +template < typename _CharT, typename _Traits > class basic_ostream:basic_ios < _CharT, + _Traits + > { +public: + _CharT char_type; + typedef basic_ostream __ostream_type; + __ostream_type & operator<< (const void *) { + } +}; +} +namespace logging { +int GetMinLogLevel (); +typedef int LogSeverity; +LogSeverity LOG_ERROR_REPORT; +LogSeverity LOG_DCHECK; +class LogMessage { +public: + LogMessage (const char *, int, LogSeverity); + std::ostream & stream () { + } +}; +class LogMessageVoidify { +public: + LogMessageVoidify () { + } void operator& (std::ostream &) { + } +}; +} +namespace base { +namespace internal { +class WeakPtrBase { +}; +class SupportsWeakPtrBase { +}; +} template < typename T > class WeakPtr:internal::WeakPtrBase { +public: + WeakPtr () :ptr_ () { + } T *operator-> () { + logging:0 && + logging::LOG_DCHECK >= + logging::GetMinLogLevel () ? (void) 0 : logging:: + LogMessageVoidify () & logging:: + LogMessage ("../../base/memory/weak_ptr.h", 0, + logging::LOG_ERROR_REPORT).stream () << ". "; + } T *ptr_; +}; +template < class > class SupportsWeakPtr:internal::SupportsWeakPtrBase { +}; +} +template < class ObserverType > class ObserverListBase:base::SupportsWeakPtr < ObserverListBase < ObserverType > + > { +public: + class Iterator { + public: + Iterator (ObserverListBase & list) :max_index_ (0 ? std::numeric_limits < + size_t >::max () : list.observers_. + size () ) { + } ObserverType * + GetNext () { + ListType & observers = list_->observers_; + if (observers[0]) + ++index_; + } + base::WeakPtr < ObserverListBase > list_; + size_t + index_; + size_t + max_index_; + }; + typedef + std::vector < + ObserverType * > + ListType; + ListType + observers_; +}; +template < class ObserverType, bool > class ObserverList:public ObserverListBase < + ObserverType > { +}; +namespace + ProxyPrefs { +enum ConfigState +{ }; +} +namespace + net { +class + ProxyConfig { +}; +class + ProxyConfigService { +public: + enum ConfigAvailability + { }; + class + Observer { + public: + Observer () { + } virtual void + OnProxyConfigChanged (const ProxyConfig &, ConfigAvailability) = 0; + }; + virtual void + OnLazyPoll () { + } +}; +} +class + ChromeProxyConfigService: + net::ProxyConfigService, + net::ProxyConfigService::Observer { + ConfigAvailability + GetLatestProxyConfig (net::ProxyConfig *); + void + UpdateProxyConfig (ProxyPrefs::ConfigState, const net::ProxyConfig &); + void + OnProxyConfigChanged (const net::ProxyConfig &, ConfigAvailability); + ObserverList < + net::ProxyConfigService::Observer, + 0 > + observers_; +}; +void +ChromeProxyConfigService::UpdateProxyConfig (ProxyPrefs::ConfigState, + const net::ProxyConfig &) { + net::ProxyConfig new_config; + ConfigAvailability availability = GetLatestProxyConfig (0); +net: + ProxyConfigService::Observer * obs; + obs->OnProxyConfigChanged (new_config, availability); +} +void +ChromeProxyConfigService::OnProxyConfigChanged (const net::ProxyConfig &, + ConfigAvailability + availability) { + net::ProxyConfig actual_config; + ObserverListBase < + net::ProxyConfigService::Observer >::Iterator it (observers_); +net: + ProxyConfigService::Observer * obs; + if (it.GetNext () ) + obs->OnProxyConfigChanged (actual_config, availability); +} diff --git a/gcc/testsuite/g++.dg/ipa/remref-1.C b/gcc/testsuite/g++.dg/ipa/remref-1.C new file mode 100644 index 00000000000..c25c425e9b7 --- /dev/null +++ b/gcc/testsuite/g++.dg/ipa/remref-1.C @@ -0,0 +1,36 @@ +/* Verify that indirect-inlining induced removal of referenes will not remove + too many references in presence of speculative devirtualization. */ +/* { dg-do link } */ +/* { dg-options "-O3 -fno-early-inlining" } */ + +class A +{ + public: + virtual void foo(void (*)(void)); +}; + +static +void b(void) +{ +} + +void +A::foo(void (*back)(void)) +{ + back(); +} + +class A *a; + +void __attribute__ ((noinline, noclone)) +allocate_a () +{ + a = new A(); +} + +main() +{ + allocate_a(); + for (int i=0; i<10000;i++) + a->foo(b); +} diff --git a/gcc/testsuite/g++.dg/ipa/remref-2.C b/gcc/testsuite/g++.dg/ipa/remref-2.C new file mode 100644 index 00000000000..06bc71a5b00 --- /dev/null +++ b/gcc/testsuite/g++.dg/ipa/remref-2.C @@ -0,0 +1,37 @@ +/* Verify that we survive creation and deletion of references to facilitate + reference removal while also doing (unsuccessful) speculative + devirtualization. */ +/* { dg-do link } */ +/* { dg-options "-O3 -fno-early-inlining" } */ + +class A +{ + public: + virtual void __attribute__ ((noinline)) foo(void (*)(void)); +}; + +static +void b(void) +{ +} + +void __attribute__ ((noinline)) +A::foo(void (*back)(void)) +{ + back(); +} + +class A *a; + +void __attribute__ ((noinline, noclone)) +allocate_a () +{ + a = new A(); +} + +main() +{ + allocate_a(); + for (int i=0; i<10000;i++) + a->foo(b); +} diff --git a/gcc/testsuite/g++.dg/overload/new1.C b/gcc/testsuite/g++.dg/overload/new1.C index 9adb4c07245..f1b7328366f 100644 --- a/gcc/testsuite/g++.dg/overload/new1.C +++ b/gcc/testsuite/g++.dg/overload/new1.C @@ -17,6 +17,5 @@ void f(X *x = new (3) X(6)); // { dg-error "" } void f(X *x = new (2) X[10]); // { dg-error "" } // { dg-message "candidate" "candidate note" { target *-*-* } 18 } -// { dg-message "operator new|candidate expects" "match candidate text" { target *-*-* } 00 } void f(X *x = new X[10][5]); // { dg-error "" } diff --git a/gcc/testsuite/g++.dg/parse/access11.C b/gcc/testsuite/g++.dg/parse/access11.C new file mode 100644 index 00000000000..7004fa76401 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/access11.C @@ -0,0 +1,35 @@ +// PR c++/24926 + +class A { + union { + int i; // { dg-error "private" } + }; + union { + int j; // { dg-error "private" } + }; + union { + union { + int k; // { dg-error "private" } + }; + union { + union { + int l; // { dg-error "private" } + }; + union { + int m; // { dg-error "private" } + union { + int n; // { dg-error "private" } + int o; // { dg-error "private" } + }; + }; + }; + }; +}; + +int a1 = A().i; // { dg-error "context" } +int a2 = A().j; // { dg-error "context" } +int a3 = A().k; // { dg-error "context" } +int a4 = A().l; // { dg-error "context" } +int a5 = A().m; // { dg-error "context" } +int a6 = A().n; // { dg-error "context" } +int a7 = A().o; // { dg-error "context" } diff --git a/gcc/testsuite/g++.dg/parse/using4.C b/gcc/testsuite/g++.dg/parse/using4.C new file mode 100644 index 00000000000..2abe399f8dc --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/using4.C @@ -0,0 +1,20 @@ +// PR c++/58457 + +struct allocator +{ + void operator delete (void*); + void* operator new (__SIZE_TYPE__, void*); +}; + +struct type : public allocator +{ + type() {} + using allocator::operator new; + using allocator::operator delete; +}; + +int main() +{ + new (0) type; + return 0; +} diff --git a/gcc/testsuite/g++.dg/pr58389.C b/gcc/testsuite/g++.dg/pr58389.C new file mode 100644 index 00000000000..648c145459b --- /dev/null +++ b/gcc/testsuite/g++.dg/pr58389.C @@ -0,0 +1,54 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +template <typename _RandomAccessIterator, typename _Compare> +void __insertion_sort(_RandomAccessIterator, _Compare); +template <typename _RandomAccessIterator, typename _Compare> +void __final_insertion_sort(_RandomAccessIterator p1, _Compare p2) { + _RandomAccessIterator a; + if (p1 - a) + ; + else + std: + __insertion_sort(0, p2); +} +template <typename _RandomAccessIterator, typename _Size, typename _Compare> +void __introsort_loop(_RandomAccessIterator, _Size, _Compare); +template <typename _RandomAccessIterator, typename _Compare> +void sort(_RandomAccessIterator, _RandomAccessIterator p2, _Compare p3) { +std: + __introsort_loop(0, 0, p3); + __final_insertion_sort(p2, p3); +} +class A { +public: + int m_fn1(); + void __lg(); + class B { + public: + int i; + int operator-(B); + }; +}; +class C; +class D { +public: + C *operator->(); +}; +class F { + A m_fn1() const; + D d_ptr; +}; +class C { + friend F; + void m_fn1(); + A children; +}; +void qt_notclosestLeaf(); +inline void C::m_fn1() { + A::B b, c; + if (children.m_fn1()) { + sort(c, b, qt_notclosestLeaf); + } +} +A F::m_fn1() const { const_cast<F *>(this)->d_ptr->m_fn1(); } diff --git a/gcc/testsuite/g++.dg/pr58438.C b/gcc/testsuite/g++.dg/pr58438.C new file mode 100644 index 00000000000..4c62cb26ce8 --- /dev/null +++ b/gcc/testsuite/g++.dg/pr58438.C @@ -0,0 +1,45 @@ +/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ +/* { dg-options "-march=amdfam10 -O3 -fprofile-generate" } */ +enum gimple_code {}; +struct A { + gimple_code code; +}; +struct B { + A gsbase; +}; +int **a; +int b, d, e, f, g, h, i, j, k, l, m, n, o; +gimple_code c, p; +class C { + virtual unsigned m_fn1(); +}; +B q; +static int fn1() { + int r; + if (k) + i = 0; + for (; i; j++) { + b = c <= 0; + if (b) + n = *a[0]; + b = p && c; + if (b) + r = *a[0]; + b = q.gsbase.code && c; + if (b) + o = *a[0]; + m = o; + if (e || 1 & r || d || l) + return 0; + } +} + +class D : C { + unsigned m_fn1() { + fn1(); + for (; h; g++) + for (;; f++) + ; + } +}; +void fn2() { new D; } diff --git a/gcc/testsuite/g++.dg/template/cond2.C b/gcc/testsuite/g++.dg/template/cond2.C index fad86bebe51..e6bd19d40fa 100644 --- a/gcc/testsuite/g++.dg/template/cond2.C +++ b/gcc/testsuite/g++.dg/template/cond2.C @@ -6,5 +6,5 @@ template<int X> class c; template<int X, int Y> int test(c<X ? : Y>&); // { dg-error "omitted" } void test(c<2>*c2) { - test<0, 2>(*c2); // { dg-message "required" } + test<0, 2>(*c2); } diff --git a/gcc/testsuite/g++.dg/template/inherit9.C b/gcc/testsuite/g++.dg/template/inherit9.C new file mode 100644 index 00000000000..926343b4e23 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/inherit9.C @@ -0,0 +1,15 @@ +// PR c++/58273 + +class A {}; +class B +{ + int goo(A); +}; +template<typename E> +class D : public B +{ + void foo(A t) + { + int const i(B::goo(t)); + } +}; diff --git a/gcc/testsuite/g++.dg/template/pseudodtor2.C b/gcc/testsuite/g++.dg/template/pseudodtor2.C index 796aff0785b..d4a9ac1cbc8 100644 --- a/gcc/testsuite/g++.dg/template/pseudodtor2.C +++ b/gcc/testsuite/g++.dg/template/pseudodtor2.C @@ -6,7 +6,7 @@ template<typename S> struct D typedef int T; S foo (); - D () { foo ().~T(); } // { dg-error "is not of type" } + D () { foo ().~T(); } // { dg-error "10:is not of type" } }; struct Z diff --git a/gcc/testsuite/g++.dg/template/pseudodtor3.C b/gcc/testsuite/g++.dg/template/pseudodtor3.C index 5f392f4e492..202182f5337 100644 --- a/gcc/testsuite/g++.dg/template/pseudodtor3.C +++ b/gcc/testsuite/g++.dg/template/pseudodtor3.C @@ -5,13 +5,13 @@ struct A { typedef int T; T &foo (); - A () { foo.~T (); } // { dg-error "does not have class type|expected" } + A () { foo.~T (); } // { dg-error "10:does not have class type|expected" } }; template <typename T> struct B { T &foo (); - B () { foo.~T (); } // { dg-error "invalid use of member" } + B () { foo.~T (); } // { dg-error "10:invalid use of member" } }; B<int> b; @@ -19,7 +19,7 @@ B<int> b; template <typename T, typename S> struct C { T t; - C () { t.~S (); } // { dg-error "is not of type" } + C () { t.~S (); } // { dg-error "10:is not of type" } }; C<int, long int> c; @@ -28,7 +28,7 @@ template <typename T> struct D { T t; typedef long int U; - D () { t.~U (); } // { dg-error "is not of type" } + D () { t.~U (); } // { dg-error "10:is not of type" } }; D<int> d; @@ -37,7 +37,7 @@ template <typename T> struct E { T &foo (); typedef long int U; - E () { foo.~U (); } // { dg-error "is not of type" } + E () { foo.~U (); } // { dg-error "10:is not of type" } }; E<int> e; diff --git a/gcc/testsuite/g++.dg/tm/noexcept-6.C b/gcc/testsuite/g++.dg/tm/noexcept-6.C new file mode 100644 index 00000000000..4391159e235 --- /dev/null +++ b/gcc/testsuite/g++.dg/tm/noexcept-6.C @@ -0,0 +1,23 @@ +// { dg-do compile } +// { dg-options "-fno-exceptions -fgnu-tm -O -std=c++0x -fdump-tree-tmlower" } + +struct TrueFalse +{ + static constexpr bool v() { return true; } +}; + +int global; + +template<typename T> int foo() +{ + return __transaction_atomic noexcept(T::v()) (global + 1); +} + +int f1() +{ + return foo<TrueFalse>(); +} + +/* { dg-final { scan-tree-dump-times "eh_must_not_throw" 0 "tmlower" } } */ +/* { dg-final { scan-tree-dump-times "__transaction_atomic" 1 "tmlower" } } */ +/* { dg-final { cleanup-tree-dump "tmlower" } } */ diff --git a/gcc/testsuite/g++.dg/torture/PR58294.C b/gcc/testsuite/g++.dg/torture/PR58294.C new file mode 100644 index 00000000000..e1fb95ae23d --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/PR58294.C @@ -0,0 +1,20 @@ +// { dg-do compile } +struct A { + virtual ~A(); + virtual void m_fn1() { delete this; } + void m_fn2() { m_fn1(); } +}; + +struct B { + A *pi_; + B() { pi_->m_fn2(); } +}; +struct C { + B pn; +}; +void _setjmp(); +int png_decode() { + _setjmp(); + C a; + return 0; +} diff --git a/gcc/testsuite/g++.dg/torture/pr58201.h b/gcc/testsuite/g++.dg/torture/pr58201.h new file mode 100644 index 00000000000..6071ccdf877 --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr58201.h @@ -0,0 +1,24 @@ +class A +{ + protected: + A(); + virtual ~A(); +}; + +class B : virtual public A +{ + public: + B(); + virtual ~B(); +}; + +class C +{ + private: + class C2 : public B + { + public: + C2(); + virtual ~C2(); + }; +}; diff --git a/gcc/testsuite/g++.dg/torture/pr58201_0.C b/gcc/testsuite/g++.dg/torture/pr58201_0.C new file mode 100644 index 00000000000..f8fa7173c11 --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr58201_0.C @@ -0,0 +1,9 @@ +#include "pr58201.h" + +C::C2::C2(){ } +C::C2::~C2() { } + +int main () +{ + return 0; +} diff --git a/gcc/testsuite/g++.dg/torture/pr58201_1.C b/gcc/testsuite/g++.dg/torture/pr58201_1.C new file mode 100644 index 00000000000..132cd5a43b8 --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr58201_1.C @@ -0,0 +1,10 @@ +/* { dg-do link } */ +/* { dg-options "-O2" } */ +/* { dg-additional-sources "pr58201_0.C" } */ +#include "pr58201.h" + +A::A() { } +A::~A() { } +B::B() { } +B::~B() { } + diff --git a/gcc/testsuite/g++.dg/torture/pr58380.C b/gcc/testsuite/g++.dg/torture/pr58380.C new file mode 100644 index 00000000000..3a6ca942067 --- /dev/null +++ b/gcc/testsuite/g++.dg/torture/pr58380.C @@ -0,0 +1,173 @@ +// { dg-do compile } +// { dg-options "-w" } + +class iplugin_factory; +class idocument_plugin_factory { + virtual idocument_plugin_factory *create_plugin(iplugin_factory &, int &); +}; +template <typename _Iterator, typename> class __normal_iterator { + _Iterator _M_current; + +public: + _Iterator iterator_type; + __normal_iterator(const _Iterator &p1) : _M_current(p1) {} + void operator++(); + _Iterator &base() { return _M_current; } +}; + +template <typename _IteratorL, typename _IteratorR, typename _Container> +int operator!=(__normal_iterator<_IteratorL, _Container> &p1, + __normal_iterator<_IteratorR, _Container> &p2) { + return p1.base() != p2.base(); +} + +class new_allocator { +public: + typedef int *const_pointer; + int *allocate(); +}; +template <typename> class allocator : public new_allocator {}; + +class basic_string { +public: + basic_string(char *); +}; +struct __uninitialized_copy { + template <typename _InputIterator, typename _ForwardIterator> + static _ForwardIterator __uninit_copy(_InputIterator p1, _InputIterator p2, + _ForwardIterator p3) try { + for (; p1 != p2; ++p1, ++p3) + ; + return p3; + } + catch (...) { + } +}; + +template <typename _InputIterator, typename _ForwardIterator> +_ForwardIterator uninitialized_copy(_InputIterator p1, _InputIterator p2, + _ForwardIterator p3) { + return __uninitialized_copy::__uninit_copy(p1, p2, p3); +} + +template <typename _InputIterator, typename _ForwardIterator, typename _Tp> +_ForwardIterator __uninitialized_copy_a(_InputIterator p1, _InputIterator p2, + _ForwardIterator p3, allocator<_Tp> &) { + return uninitialized_copy(p1, p2, p3); +} + +struct _Vector_base { + struct _Vector_impl : allocator<int> { + int *_M_start; + int *_M_finish; + }; + allocator<int> &_M_get_Tp_allocator() {} + _Vector_base() {} + _Vector_base(int p1) { _M_create_storage(p1); } + _Vector_impl _M_impl; + int *_M_allocate(int p1) { p1 ? _M_impl.allocate() : 0; } + void _M_create_storage(int p1) { + this->_M_impl._M_start = this->_M_allocate(p1); + } +}; + +class vector : _Vector_base { + _Vector_base _Base; + +public: + vector() {} + vector(const vector &p1) : _Base(p1.size()) { + this->_M_impl._M_finish = __uninitialized_copy_a( + p1.begin(), p1.end(), this->_M_impl._M_start, _M_get_Tp_allocator()); + } + ~vector(); + __normal_iterator<typename allocator<int>::const_pointer, int> begin() const { + return this->_M_impl._M_start; + } + __normal_iterator<typename allocator<int>::const_pointer, int> end() const { + return this->_M_impl._M_finish; + } + int size() const { return this->_M_impl._M_finish - this->_M_impl._M_start; } +}; +class iplugin_factory { +public: + typedef enum { + STABLE, + EXPERIMENTAL + } quality_t; +}; +class plugin_factory : public iplugin_factory { +public: + plugin_factory(const int &, const basic_string &, const basic_string &, + const basic_string &, quality_t); +}; +template <typename plugin_t> +class document_plugin_factory : plugin_factory, idocument_plugin_factory { +public: + document_plugin_factory(const int &p1, const basic_string &, + const basic_string &, const basic_string &, quality_t) + : plugin_factory(0, 0, 0, 0, STABLE) {} + idocument_plugin_factory *create_plugin(iplugin_factory &p1, int &p2) { + plugin_t(p1, p2); + } +}; + +class container { +public: + template <typename init_t> container(init_t &); +}; +template <class init_t> class initializer_t : init_t { +public: + initializer_t(const init_t &p1) : init_t(p1) {} +}; + +class composition_t {}; +template <typename lhs_t, typename rhs_t> +const initializer_t<composition_t> operator+(const initializer_t<lhs_t> &, + const initializer_t<rhs_t> &); +template <typename value_t> class value_initializer_t { +public: + value_initializer_t(const value_t &p1) : m_value(p1) {} + value_t m_value; +}; + +template <typename value_t> +initializer_t<value_initializer_t<value_t> > init_value(const value_t &p1) { + initializer_t<value_initializer_t<value_t> >( + value_initializer_t<value_t>(p1)); +} + +class name_t {}; +class label_t {}; +class description_t {}; +class owner_initializer_t {}; +template <typename owner_t> +initializer_t<owner_initializer_t> init_owner(owner_t &); +class set : vector {}; +class node { +public: + node(iplugin_factory &, int &); +}; +initializer_t<name_t> init_name(); +initializer_t<label_t> init_label(); +initializer_t<description_t> init_description(); +template <typename base_t> class mesh_selection_sink : base_t { +public: + mesh_selection_sink(iplugin_factory &p1, int &p2) + : base_t(p1, p2), + m_mesh_selection(init_owner(*this) + init_name() + init_label() + + init_description() + init_value(set())) {} + container m_mesh_selection; +}; + +class selection_to_stdout : mesh_selection_sink<node> { +public: + selection_to_stdout(iplugin_factory &p1, int &p2) + : mesh_selection_sink(p1, p2) {} + static iplugin_factory &get_factory() { + document_plugin_factory<selection_to_stdout>(0, "", 0, "", + iplugin_factory::EXPERIMENTAL); + } +}; + +void selection_to_stdout_factory() { selection_to_stdout::get_factory(); } diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr58404.C b/gcc/testsuite/g++.dg/tree-ssa/pr58404.C new file mode 100644 index 00000000000..aa8fb796c6f --- /dev/null +++ b/gcc/testsuite/g++.dg/tree-ssa/pr58404.C @@ -0,0 +1,20 @@ +// { dg-do compile } +// { dg-options "-O -fdump-tree-cddce1" } + +struct S { int s; }; +S a[1024]; + +void +foo () +{ + for (int i = 0; i < 1024; i++) + { + S &r = a[i]; + r.s++; + } +} + +// We should propagate the reference into both memory accesses +// during the first forwprop pass +// { dg-final { scan-tree-dump-times "= &a" 0 "cddce1" } } +// { dg-final { cleanup-tree-dump "cddce1" } } diff --git a/gcc/testsuite/g++.dg/ubsan/div-by-zero-1.C b/gcc/testsuite/g++.dg/ubsan/div-by-zero-1.C index d7d2c8f1565..88acfa1517e 100644 --- a/gcc/testsuite/g++.dg/ubsan/div-by-zero-1.C +++ b/gcc/testsuite/g++.dg/ubsan/div-by-zero-1.C @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-options "-fsanitize=shift -w" } */ +/* { dg-options "-fsanitize=integer-divide-by-zero -w" } */ void foo (int i) diff --git a/gcc/testsuite/g++.dg/uninit-pred-4.C b/gcc/testsuite/g++.dg/uninit-pred-4.C new file mode 100644 index 00000000000..94ab13c50d6 --- /dev/null +++ b/gcc/testsuite/g++.dg/uninit-pred-4.C @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-Wuninitialized -Og" } */ + +int pop (); +int pop_first_bucket; + +int my_pop () +{ + int out; // { dg-bogus "uninitialized" "uninitialized variable warning" } + + while (pop_first_bucket) + if (pop_first_bucket && (out = pop())) + return out; + + return 0; +} diff --git a/gcc/testsuite/g++.dg/warn/Wdelete-incomplete-1.C b/gcc/testsuite/g++.dg/warn/Wdelete-incomplete-1.C new file mode 100644 index 00000000000..69689ba3488 --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Wdelete-incomplete-1.C @@ -0,0 +1,7 @@ +// PR c++/43452 + +class Foo; // { dg-warning "forward" } +int main() { + Foo* p; // { dg-warning "incomplete" } + delete [] p; // { dg-warning "problem" } +} diff --git a/gcc/testsuite/g++.dg/warn/Wdelete-incomplete-2.C b/gcc/testsuite/g++.dg/warn/Wdelete-incomplete-2.C new file mode 100644 index 00000000000..6c3aaa74f1a --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Wdelete-incomplete-2.C @@ -0,0 +1,8 @@ +// PR c++/43452 +// { dg-options -Wno-delete-incomplete } + +class Foo; +int main() { + Foo* p; + delete [] p; +} diff --git a/gcc/testsuite/g++.dg/warn/Wunused-parm-5.C b/gcc/testsuite/g++.dg/warn/Wunused-parm-5.C new file mode 100644 index 00000000000..e952d0221bd --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Wunused-parm-5.C @@ -0,0 +1,14 @@ +// PR c++/58362 +// { dg-options "-Wunused-parameter" } + +void f1 (long s) { } // { dg-warning "15:unused parameter 's'" } + +void f2 (long s, int u) { } // { dg-warning "15:unused parameter 's'" } +// { dg-warning "22:unused parameter 'u'" "" { target *-*-* } 6 } + +void f3 (long s); +void f3 (long s) { } // { dg-warning "15:unused parameter 's'" } + +void f4 (long s, int u); +void f4 (long s, int u) { } // { dg-warning "15:unused parameter 's'" } +// { dg-warning "22:unused parameter 'u'" "" { target *-*-* } 13 } diff --git a/gcc/testsuite/g++.dg/warn/Wunused-var-21.C b/gcc/testsuite/g++.dg/warn/Wunused-var-21.C new file mode 100644 index 00000000000..d279e598033 --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Wunused-var-21.C @@ -0,0 +1,31 @@ +// PR c++/58325 +// { dg-do compile } +// { dg-options "-Wunused" } + +void +f1 () +{ + int *volatile a = new int[1]; + delete[] a; +} + +void +f2 () +{ + int *b = new int[1]; + delete[] b; +} + +void +f3 () +{ + int *volatile c = new int; + delete c; +} + +void +f4 () +{ + int *d = new int; + delete d; +} diff --git a/gcc/testsuite/g++.dg/warn/weak1.C b/gcc/testsuite/g++.dg/warn/weak1.C index efce90a2bcf..456e6f34c53 100644 --- a/gcc/testsuite/g++.dg/warn/weak1.C +++ b/gcc/testsuite/g++.dg/warn/weak1.C @@ -2,6 +2,7 @@ // { dg-require-weak "" } // The PA HP-UX dynamic loader doesn't support unsatisfied weak symbols. // { dg-skip-if "No unsat" { hppa*-*-hpux* } { "*" } { "" } } +// { dg-skip-if "No weak unsat" { *-*-aix* } { "*" } { "" } } // The darwin loader does, but they do need to exist at link time. // { dg-skip-if "No link unsat" { *-*-darwin* } { "*" } { "" } } // For kernel modules and static RTPs, the loader treats undefined weak |