0005-testsuite-Add-fchecking-to-dg-ice-tests.patch 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. From 484239a45044ffefebb54286ce89e71ce3304d8f Mon Sep 17 00:00:00 2001
  2. From: Jakub Jelinek <jakub@redhat.com>
  3. Date: Wed, 21 Apr 2021 15:17:10 +0200
  4. Subject: [PATCH 05/15] testsuite: Add -fchecking to dg-ice tests
  5. In --enable-checking=release builds (which is the default on release
  6. branches), I'm getting various extra FAILs that don't appear in
  7. --enable-checking=yes builds.
  8. XPASS: g++.dg/cpp0x/constexpr-52830.C -std=c++14 (internal compiler error)
  9. FAIL: g++.dg/cpp0x/constexpr-52830.C -std=c++14 (test for excess errors)
  10. XPASS: g++.dg/cpp0x/constexpr-52830.C -std=c++17 (internal compiler error)
  11. FAIL: g++.dg/cpp0x/constexpr-52830.C -std=c++17 (test for excess errors)
  12. XPASS: g++.dg/cpp0x/constexpr-52830.C -std=c++2a (internal compiler error)
  13. FAIL: g++.dg/cpp0x/constexpr-52830.C -std=c++2a (test for excess errors)
  14. FAIL: g++.dg/cpp0x/vt-88982.C -std=c++14 (test for excess errors)
  15. FAIL: g++.dg/cpp0x/vt-88982.C -std=c++17 (test for excess errors)
  16. FAIL: g++.dg/cpp0x/vt-88982.C -std=c++2a (test for excess errors)
  17. FAIL: g++.dg/cpp1y/auto-fn61.C -std=c++14 (test for excess errors)
  18. FAIL: g++.dg/cpp1y/auto-fn61.C -std=c++17 (test for excess errors)
  19. FAIL: g++.dg/cpp1y/auto-fn61.C -std=c++2a (test for excess errors)
  20. FAIL: g++.dg/cpp1z/constexpr-lambda26.C -std=c++17 (test for excess errors)
  21. FAIL: g++.dg/cpp1z/constexpr-lambda26.C -std=c++2a (test for excess errors)
  22. FAIL: g++.dg/cpp2a/nontype-class39.C -std=c++2a (test for excess errors)
  23. FAIL: c-c++-common/goacc/kernels-decompose-ice-1.c -std=c++14 (test for excess errors)
  24. FAIL: c-c++-common/goacc/kernels-decompose-ice-1.c -std=c++17 (test for excess errors)
  25. FAIL: c-c++-common/goacc/kernels-decompose-ice-1.c -std=c++2a (test for excess errors)
  26. FAIL: c-c++-common/goacc/kernels-decompose-ice-1.c -std=c++98 (test for excess errors)
  27. FAIL: c-c++-common/goacc/kernels-decompose-ice-2.c -std=c++14 (test for excess errors)
  28. FAIL: c-c++-common/goacc/kernels-decompose-ice-2.c -std=c++17 (test for excess errors)
  29. FAIL: c-c++-common/goacc/kernels-decompose-ice-2.c -std=c++2a (test for excess errors)
  30. FAIL: c-c++-common/goacc/kernels-decompose-ice-2.c -std=c++98 (test for excess errors)
  31. These are tests that have dg-ice and most of those ICEs are checking ICEs
  32. which go away in release checking when -fno-checking is the default.
  33. The following patch adds -fchecking option to those.
  34. 2021-04-21 Jakub Jelinek <jakub@redhat.com>
  35. * g++.dg/cpp1z/constexpr-lambda26.C: Add dg-additional-options
  36. -fchecking.
  37. * g++.dg/cpp1y/auto-fn61.C: Likewise.
  38. * g++.dg/cpp2a/nontype-class39.C: Likewise.
  39. * g++.dg/cpp0x/constexpr-52830.C: Likewise.
  40. * g++.dg/cpp0x/vt-88982.C: Likewise.
  41. * c-c++-common/goacc/kernels-decompose-ice-1.c: Add -fchecking to
  42. dg-additional-options.
  43. * c-c++-common/goacc/kernels-decompose-ice-2.c: Likewise.
  44. ---
  45. gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-1.c | 2 +-
  46. gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-2.c | 2 +-
  47. gcc/testsuite/g++.dg/cpp0x/constexpr-52830.C | 1 +
  48. gcc/testsuite/g++.dg/cpp0x/vt-88982.C | 1 +
  49. gcc/testsuite/g++.dg/cpp1y/auto-fn61.C | 1 +
  50. gcc/testsuite/g++.dg/cpp1z/constexpr-lambda26.C | 1 +
  51. gcc/testsuite/g++.dg/cpp2a/nontype-class39.C | 1 +
  52. 7 files changed, 7 insertions(+), 2 deletions(-)
  53. diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-1.c b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-1.c
  54. index d770b91dd09..8c3884bdc00 100644
  55. --- a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-1.c
  56. +++ b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-1.c
  57. @@ -1,7 +1,7 @@
  58. /* Test OpenACC 'kernels' construct decomposition. */
  59. /* { dg-additional-options "-fopt-info-omp-all" } */
  60. -/* { dg-additional-options "--param=openacc-kernels=decompose" } */
  61. +/* { dg-additional-options "-fchecking --param=openacc-kernels=decompose" } */
  62. /* { dg-ice "TODO" }
  63. { dg-prune-output "during GIMPLE pass: omplower" } */
  64. diff --git a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-2.c b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-2.c
  65. index ae059eb354b..8bf60a9a509 100644
  66. --- a/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-2.c
  67. +++ b/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-2.c
  68. @@ -1,6 +1,6 @@
  69. /* Test OpenACC 'kernels' construct decomposition. */
  70. -/* { dg-additional-options "--param=openacc-kernels=decompose" } */
  71. +/* { dg-additional-options "-fchecking --param=openacc-kernels=decompose" } */
  72. /* { dg-ice "TODO" }
  73. { dg-prune-output "during GIMPLE pass: omplower" } */
  74. diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-52830.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-52830.C
  75. index 2c9d2f9b329..eae0d8c377b 100644
  76. --- a/gcc/testsuite/g++.dg/cpp0x/constexpr-52830.C
  77. +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-52830.C
  78. @@ -1,5 +1,6 @@
  79. // PR c++/52830
  80. // { dg-do compile { target c++11 } }
  81. +// { dg-additional-options "-fchecking" }
  82. // { dg-ice "comptypes" }
  83. template<bool b> struct eif { typedef void type; };
  84. diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-88982.C b/gcc/testsuite/g++.dg/cpp0x/vt-88982.C
  85. index cb9530dcee1..7a868233d73 100644
  86. --- a/gcc/testsuite/g++.dg/cpp0x/vt-88982.C
  87. +++ b/gcc/testsuite/g++.dg/cpp0x/vt-88982.C
  88. @@ -1,5 +1,6 @@
  89. // PR c++/88982
  90. // { dg-do compile { target c++11 } }
  91. +// { dg-additional-options "-fchecking" }
  92. // { dg-ice "tsubst_pack_expansion" }
  93. template<typename...Ts> struct A {
  94. diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn61.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn61.C
  95. index c24c3b85d78..bed5ea0cfc0 100644
  96. --- a/gcc/testsuite/g++.dg/cpp1y/auto-fn61.C
  97. +++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn61.C
  98. @@ -1,5 +1,6 @@
  99. // PR c++/88003
  100. // { dg-do compile { target c++14 } }
  101. +// { dg-additional-options "-fchecking" }
  102. // { dg-ice "poplevel_class" }
  103. auto test() {
  104. diff --git a/gcc/testsuite/g++.dg/cpp1z/constexpr-lambda26.C b/gcc/testsuite/g++.dg/cpp1z/constexpr-lambda26.C
  105. index d6c8bae525f..0cdb400d21c 100644
  106. --- a/gcc/testsuite/g++.dg/cpp1z/constexpr-lambda26.C
  107. +++ b/gcc/testsuite/g++.dg/cpp1z/constexpr-lambda26.C
  108. @@ -1,5 +1,6 @@
  109. // PR c++/87765
  110. // { dg-do compile { target c++17 } }
  111. +// { dg-additional-options "-fchecking" }
  112. // { dg-ice "cxx_eval_constant_expression" }
  113. template <int N>
  114. diff --git a/gcc/testsuite/g++.dg/cpp2a/nontype-class39.C b/gcc/testsuite/g++.dg/cpp2a/nontype-class39.C
  115. index f5f79a71ec2..512afad8e4f 100644
  116. --- a/gcc/testsuite/g++.dg/cpp2a/nontype-class39.C
  117. +++ b/gcc/testsuite/g++.dg/cpp2a/nontype-class39.C
  118. @@ -1,5 +1,6 @@
  119. // PR c++/89565
  120. // { dg-do compile { target c++20 } }
  121. +// { dg-additional-options "-fchecking" }
  122. // { dg-ice "resolve_args" }
  123. template <auto>
  124. --
  125. 2.33.1