public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: [committed] Fix overload15.C testcase (PR c++/79064)
@ 2018-02-19 20:20 David Edelsohn
  2018-02-19 20:49 ` Jakub Jelinek
  0 siblings, 1 reply; 6+ messages in thread
From: David Edelsohn @ 2018-02-19 20:20 UTC (permalink / raw)
  To: Jakub Jelinek, Martin Sebor; +Cc: GCC Patches

This testcase continues to fail for -m32 on powerpc64-linux-gnu and on AIX.

Excess errors:
/nasfarm/edelsohn/src/src/gcc/testsuite/g++.dg/template/overload15.C:14:10:
error: call of overloaded 'f<0>(char (*)[1])' is ambiguous
/nasfarm/edelsohn/src/src/gcc/testsuite/g++.dg/template/overload15.C:15:10:
error: no matching function for call to 'f<0>(char (*)[7])'

The full error message with suggestions is:

/nasfarm/edelsohn/src/src/gcc/testsuite/g++.dg/template/overload15.C:
In function 'void f()':
/nasfarm/edelsohn/src/src/gcc/testsuite/g++.dg/template/overload15.C:14:10:
error: call of overloaded 'f<0>(char (*)[1])' is ambiguous
/nasfarm/edelsohn/src/src/gcc/testsuite/g++.dg/template/overload15.C:5:6:
note: candidate: 'void f(char (*)[(((0 - 1) > N) ? 1 : 7)]) [with
unsigned int N = 0]'
/nasfarm/edelsohn/src/src/gcc/testsuite/g++.dg/template/overload15.C:8:6:
note: candidate: 'void f(char (*)[(((0 - 1) > N) ? 1 : 7)]) [with
unsigned int N = 0]'
/nasfarm/edelsohn/src/src/gcc/testsuite/g++.dg/template/overload15.C:15:10:
error: no matching function for call to 'f<0>(char (*)[7])'
/nasfarm/edelsohn/src/src/gcc/testsuite/g++.dg/template/overload15.C:5:6:
note: candidate: 'template<unsigned int N> void f(char (*)[(((0 - 1) >
N) ? 1 : 7)])'
/nasfarm/edelsohn/src/src/gcc/testsuite/g++.dg/template/overload15.C:5:6:
note:   template argument deduction/substitution failed:
/nasfarm/edelsohn/src/src/gcc/testsuite/g++.dg/template/overload15.C:15:8:
note:   cannot convert '& y' (type 'char (*)[7]') to type 'char
(*)[1]'
/nasfarm/edelsohn/src/src/gcc/testsuite/g++.dg/template/overload15.C:8:6:
note: candidate: 'template<unsigned int N> void f(char (*)[(((0 - 1) >
N) ? 1 : 7)])'
/nasfarm/edelsohn/src/src/gcc/testsuite/g++.dg/template/overload15.C:8:6:
note:   template argument deduction/substitution failed:
/nasfarm/edelsohn/src/src/gcc/testsuite/g++.dg/template/overload15.C:15:8:
note:   cannot convert '& y' (type 'char (*)[7]') to type 'char
(*)[1]'

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [committed] Fix overload15.C testcase (PR c++/79064)
@ 2018-02-19 18:52 Jakub Jelinek
  0 siblings, 0 replies; 6+ messages in thread
From: Jakub Jelinek @ 2018-02-19 18:52 UTC (permalink / raw)
  To: gcc-patches; +Cc: Martin Sebor

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-19 22:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-19 20:20 [committed] Fix overload15.C testcase (PR c++/79064) David Edelsohn
2018-02-19 20:49 ` Jakub Jelinek
2018-02-19 20:31   ` David Edelsohn
2018-02-19 22:49     ` Jakub Jelinek
2018-02-19 20:46       ` David Edelsohn
  -- strict thread matches above, loose matches on Subject: below --
2018-02-19 18:52 Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).