diff mbox

C++ PATCH for c++/78948 (instantiation from discarded statement)

Message ID 20170109162528.GN21933@tucnak
State New
Headers show

Commit Message

Jakub Jelinek Jan. 9, 2017, 4:25 p.m. UTC
On Mon, Jan 09, 2017 at 09:10:06AM -0500, Nathan Sidwell wrote:
> On 01/09/2017 09:03 AM, Jakub Jelinek wrote:
> 
> > FAIL: g++.dg/cpp1z/constexpr-if10.C   (test for excess errors)
> > 
> > Could we do e.g.
> > sed -i -e 's/long long/int */g' testsuite/g++.dg/cpp1z/constexpr-if10.C
> > so that it is something where if constexpr will be always true?
> 
> that would seem fine to me

Here is what I've committed to trunk then
(the testcase still fails with older cc1plus and
make check-c++-all RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} dg.exp=constexpr-if*.C'
and passes with current cc1plus).

2017-01-09  Jakub Jelinek  <jakub@redhat.com>

	PR c++/78948
	* g++.dg/cpp1z/constexpr-if10.C: Fix PR number in comment.
	(main): Use int* instead of long long.



	Jakub
diff mbox

Patch

--- gcc/testsuite/g++.dg/cpp1z/constexpr-if10.C.jj	2017-01-08 17:41:17.000000000 +0100
+++ gcc/testsuite/g++.dg/cpp1z/constexpr-if10.C	2017-01-09 17:15:54.006314980 +0100
@@ -1,4 +1,4 @@ 
-// PR c++/79848
+// PR c++/78948
 // { dg-options -std=c++1z }
 
 template <int T>
@@ -9,8 +9,8 @@  void sizeof_mismatch()
 
 int main()
 {
-  if constexpr(sizeof(long long) == sizeof(char*))
+  if constexpr(sizeof(int*) == sizeof(char*))
     ;
   else
-    sizeof_mismatch<sizeof(long long)>();
+    sizeof_mismatch<sizeof(int*)>();
 }