This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Fix overload15.C testcase (PR c++/79064)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Martin Sebor <msebor at gmail dot com>
- Date: Mon, 19 Feb 2018 19:52:24 +0100
- Subject: [committed] Fix overload15.C testcase (PR c++/79064)
- Authentication-results: sourceware.org; auth=none
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
The testcase that has been committed for this PR doesn't work on ilp32
targets, because both 0u - 1 and 0u - 1l are there 0xffffffffu.
The testcase originally filed had proper 0u - 1ll in the second case, which
works on all targets where long long is wider than int (not aware of any
target we support where that wouldn't be true right now).
Tested on x86_64-linux, -m32/-m64, committed to trunk as obvious.
2018-02-19 Jakub Jelinek <jakub@redhat.com>
PR c++/79064
* g++.dg/template/overload15.C (f): Use 0u - 1ll instead of 0u - 1l.
--- gcc/testsuite/g++.dg/template/overload15.C.jj 2018-02-16 23:37:28.682364104 +0100
+++ gcc/testsuite/g++.dg/template/overload15.C 2018-02-19 19:45:48.771094113 +0100
@@ -5,7 +5,7 @@ template <unsigned N>
void f (char (*)[0u - 1 > N ? 1 : 7]);
template <unsigned N>
-void f (char (*)[0u - 1l > N ? 1 : 7]);
+void f (char (*)[0u - 1ll > N ? 1 : 7]);
void f ()
{
Jakub