Add -fdelete-null-pointer-checks to some C++ testcases.
These testcases were failing on nios2-elf, which defaults to -fno-delete-null-pointer-checks. 2020-01-24 Sandra Loosemore <sandra@codesourcery.com> gcc/testsuite/ * g++.dg/cpp0x/constexpr-odr1.C: Add -fdelete-null-pointer-checks. * g++.dg/cpp0x/constexpr-odr2.C: Likewise. * g++.dg/cpp0x/nontype4.C: Likewise. * g++.dg/cpp1y/constexpr-new.C: Likewise. * g++.dg/cpp1y/new1.C: Likewise. * g++.dg/cpp1y/new2.C: Likewise. * g++.dg/cpp2a/constexpr-dynamic11.C: Likewise. * g++.dg/cpp2a/constexpr-dynamic17.C: Likewise. * g++.dg/cpp2a/constexpr-dynamic4.C: Likewise. * g++.dg/cpp2a/constexpr-new1.C: Likewise. * g++.dg/cpp2a/constexpr-new10.C: Likewise. * g++.dg/cpp2a/constexpr-new2.C: Likewise. * g++.dg/cpp2a/constexpr-new3.C: Likewise. * g++.dg/cpp2a/constexpr-new4.C: Likewise. * g++.dg/cpp2a/constexpr-new8.C: Likewise. * g++.dg/cpp2a/constexpr-new9.C: Likewise. * g++.dg/cpp2a/nontype-class1.C: Likewise.
This commit is contained in:
parent
28a5d5c365
commit
7c75a2a3bf
18 changed files with 37 additions and 0 deletions
|
@ -1,3 +1,23 @@
|
|||
2020-01-24 Sandra Loosemore <sandra@codesourcery.com>
|
||||
|
||||
* g++.dg/cpp0x/constexpr-odr1.C: Add -fdelete-null-pointer-checks.
|
||||
* g++.dg/cpp0x/constexpr-odr2.C: Likewise.
|
||||
* g++.dg/cpp0x/nontype4.C: Likewise.
|
||||
* g++.dg/cpp1y/constexpr-new.C: Likewise.
|
||||
* g++.dg/cpp1y/new1.C: Likewise.
|
||||
* g++.dg/cpp1y/new2.C: Likewise.
|
||||
* g++.dg/cpp2a/constexpr-dynamic11.C: Likewise.
|
||||
* g++.dg/cpp2a/constexpr-dynamic17.C: Likewise.
|
||||
* g++.dg/cpp2a/constexpr-dynamic4.C: Likewise.
|
||||
* g++.dg/cpp2a/constexpr-new1.C: Likewise.
|
||||
* g++.dg/cpp2a/constexpr-new10.C: Likewise.
|
||||
* g++.dg/cpp2a/constexpr-new2.C: Likewise.
|
||||
* g++.dg/cpp2a/constexpr-new3.C: Likewise.
|
||||
* g++.dg/cpp2a/constexpr-new4.C: Likewise.
|
||||
* g++.dg/cpp2a/constexpr-new8.C: Likewise.
|
||||
* g++.dg/cpp2a/constexpr-new9.C: Likewise.
|
||||
* g++.dg/cpp2a/nontype-class1.C: Likewise.
|
||||
|
||||
2020-01-24 Jason Merrill <jason@redhat.com>
|
||||
|
||||
* lib/target-supports.exp (check_effective_target_unsigned_char):
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// PR c++/92062 - ODR-use ignored for static member of class template.
|
||||
// { dg-do run { target c++11 } }
|
||||
// { dg-additional-options "-fdelete-null-pointer-checks" }
|
||||
|
||||
template<int> struct A {
|
||||
static const bool x;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// PR c++/92062 - ODR-use ignored for static member of class template.
|
||||
// { dg-do run { target c++11 } }
|
||||
// { dg-additional-options "-fdelete-null-pointer-checks" }
|
||||
|
||||
template<int> struct A {
|
||||
static const bool x;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// PR c++/56428
|
||||
// { dg-do compile { target c++11 } }
|
||||
// { dg-additional-options "-fdelete-null-pointer-checks" }
|
||||
|
||||
struct A { };
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++14 } }
|
||||
// { dg-additional-options "-fdelete-null-pointer-checks" }
|
||||
|
||||
constexpr int *f4(bool b) {
|
||||
if (b) {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -fdump-tree-cddce-details" } */
|
||||
// { dg-additional-options "-fdelete-null-pointer-checks" }
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O2 -std=c++17 -fdump-tree-cddce-details" } */
|
||||
/* { dg-additional-options "-fdelete-null-pointer-checks" } */
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr.
|
||||
// { dg-do compile { target c++2a } }
|
||||
// { dg-additional-options "-fdelete-null-pointer-checks" }
|
||||
|
||||
// dynamic_cast in a constructor.
|
||||
// [class.cdtor]#6: "If the operand of the dynamic_cast refers to the object
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr.
|
||||
// { dg-do compile { target c++2a } }
|
||||
// { dg-additional-options "-fdelete-null-pointer-checks" }
|
||||
|
||||
// dynamic_cast in a constructor.
|
||||
// [class.cdtor]#6: "If the operand of the dynamic_cast refers to the object
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// PR c++/88337 - Implement P1327R1: Allow dynamic_cast/typeid in constexpr.
|
||||
// { dg-do compile { target c++2a } }
|
||||
// { dg-additional-options "-fdelete-null-pointer-checks" }
|
||||
|
||||
// From clang's constant-expression-cxx2a.cpp.
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// P0784R7
|
||||
// { dg-do compile { target c++2a } }
|
||||
// { dg-additional-options "-fdelete-null-pointer-checks" }
|
||||
|
||||
struct S { constexpr S () : s (5) {} constexpr S (int x) : s (x) {} int s; };
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// PR c++/91369
|
||||
// { dg-do compile { target c++2a } }
|
||||
// { dg-additional-options "-fdelete-null-pointer-checks" }
|
||||
|
||||
struct S {
|
||||
constexpr S (int* i) : s{i} {}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// P0784R7
|
||||
// { dg-do compile { target c++2a } }
|
||||
// { dg-additional-options "-fdelete-null-pointer-checks" }
|
||||
|
||||
template <int N>
|
||||
constexpr bool
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// P0784R7
|
||||
// { dg-do compile { target c++2a } }
|
||||
// { dg-additional-options "-fdelete-null-pointer-checks" }
|
||||
|
||||
constexpr int *
|
||||
f1 ()
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// P0784R7
|
||||
// { dg-do compile { target c++2a } }
|
||||
// { dg-additional-options "-fdelete-null-pointer-checks" }
|
||||
|
||||
struct S
|
||||
{
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// PR c++/91369
|
||||
// { dg-do compile { target c++2a } }
|
||||
// { dg-additional-options "-fdelete-null-pointer-checks" }
|
||||
|
||||
struct A {
|
||||
constexpr A () : p{new int} {}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
// PR c++/91369
|
||||
// { dg-do compile { target c++2a } }
|
||||
// { dg-additional-options "-fdelete-null-pointer-checks" }
|
||||
|
||||
struct S {
|
||||
constexpr S (int *i) : i{i} {}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// { dg-do compile { target c++2a } }
|
||||
// { dg-additional-options "-fdelete-null-pointer-checks" }
|
||||
|
||||
struct A
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue