public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [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

* Re: [committed] Fix overload15.C testcase (PR c++/79064)
  2018-02-19 20:31   ` David Edelsohn
@ 2018-02-19 22:49     ` Jakub Jelinek
  2018-02-19 20:46       ` David Edelsohn
  0 siblings, 1 reply; 6+ messages in thread
From: Jakub Jelinek @ 2018-02-19 22:49 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Martin Sebor, GCC Patches

On Mon, Feb 19, 2018 at 03:31:13PM -0500, David Edelsohn wrote:
> https://gcc.gnu.org/ml/gcc-testresults/2018-02/msg01247.html
> 
> === g++ tests ===
> 
> 
> Running target unix/-m32
> ...
> FAIL: g++.dg/template/overload15.C  -std=c++11 (test for excess errors)
> FAIL: g++.dg/template/overload15.C  -std=c++14 (test for excess errors)
> FAIL: g++.dg/template/overload15.C  -std=c++98 (test for excess errors)

But that one is
LAST_UPDATED: Mon Feb 19 11:29:19 UTC 2018 (revision 257803)
I've fixed the testcase only in r257818.

	Jakub

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

* Re: [committed] Fix overload15.C testcase (PR c++/79064)
  2018-02-19 20:20 David Edelsohn
@ 2018-02-19 20:49 ` Jakub Jelinek
  2018-02-19 20:31   ` David Edelsohn
  0 siblings, 1 reply; 6+ messages in thread
From: Jakub Jelinek @ 2018-02-19 20:49 UTC (permalink / raw)
  To: David Edelsohn; +Cc: Martin Sebor, GCC Patches

On Mon, Feb 19, 2018 at 03:20:25PM -0500, David Edelsohn wrote:
> 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])'

Can't reproduce on powerpc64-linux-gnu:

hostname; md5sum ../../gcc/testsuite/g++.dg/template/overload15.C; make check-c++-all RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} dg.exp=overload15.C'
gcc1-power7.osuosl.org
74f8286a84b07ec4d8ba0b125a014426  ../../gcc/testsuite/g++.dg/template/overload15.C
make RUNTESTFLAGS="--target_board=unix\{-m32,-m64\} dg.exp=overload15.C --stds=98,11,14,17,2a,concepts" check-g++
make[1]: Entering directory `/home/jakub/gcc2/obj20/gcc'
rm -rf testsuite/g++-parallel
make[2]: Entering directory `/home/jakub/gcc2/obj20/gcc'
(rootme=`${PWDCMD-pwd}`; export rootme; \
srcdir=`cd ../../gcc; ${PWDCMD-pwd}` ; export srcdir ; \
if [ -n "" ] \
   && [ -n "$GCC_RUNTEST_PARALLELIZE_DIR" ] \
   && [ -f testsuite/g++-parallel/finished ]; then \
  rm -rf testsuite/g++; \
else \
  cd testsuite/g++; \
  rm -f tmp-site.exp; \
  sed '/set tmpdir/ s|testsuite$|testsuite/g++|' \
	< ../../site.exp > tmp-site.exp; \
  /bin/sh ${srcdir}/../move-if-change tmp-site.exp site.exp; \
  EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \
  if [ -f ${rootme}/../expect/expect ] ; then  \
    TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \
    export TCL_LIBRARY ; \
  fi ; \
  `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ --target_board=unix\{-m32,-m64\} dg.exp=overload15.C --stds=98,11,14,17,2a,concepts; \
  if [ -n "$GCC_RUNTEST_PARALLELIZE_DIR" ] ; then \
    touch ${rootme}/testsuite/g++-parallel/finished; \
  fi ; \
fi )
WARNING: Couldn't find the global config file.
Test Run By jakub on Mon Feb 19 20:27:41 2018
Native configuration is powerpc64-unknown-linux-gnu

		=== g++ tests ===

Schedule of variations:
    unix/-m32
    unix/-m64

Running target unix/-m32
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using /home/jakub/gcc2/gcc/testsuite/config/default.exp as tool-and-target-specific interface file.
Running /home/jakub/gcc2/gcc/testsuite/g++.dg/dg.exp ...

		=== g++ Summary for unix/-m32 ===

# of expected passes		6
Running target unix/-m64
Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
Using /home/jakub/gcc2/gcc/testsuite/config/default.exp as tool-and-target-specific interface file.
Running /home/jakub/gcc2/gcc/testsuite/g++.dg/dg.exp ...

		=== g++ Summary for unix/-m64 ===

# of expected passes		6

		=== g++ Summary ===

# of expected passes		12
/home/jakub/gcc2/obj20/gcc/testsuite/g++/../../xg++  version 8.0.1 20180214 (experimental) (GCC) 

make[2]: Leaving directory `/home/jakub/gcc2/obj20/gcc'
make[1]: Leaving directory `/home/jakub/gcc2/obj20/gcc'

	Jakub

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

* Re: [committed] Fix overload15.C testcase (PR c++/79064)
  2018-02-19 22:49     ` Jakub Jelinek
@ 2018-02-19 20:46       ` David Edelsohn
  0 siblings, 0 replies; 6+ messages in thread
From: David Edelsohn @ 2018-02-19 20:46 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Martin Sebor, GCC Patches

On Mon, Feb 19, 2018 at 3:35 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Mon, Feb 19, 2018 at 03:31:13PM -0500, David Edelsohn wrote:
>> https://gcc.gnu.org/ml/gcc-testresults/2018-02/msg01247.html
>>
>> === g++ tests ===
>>
>>
>> Running target unix/-m32
>> ...
>> FAIL: g++.dg/template/overload15.C  -std=c++11 (test for excess errors)
>> FAIL: g++.dg/template/overload15.C  -std=c++14 (test for excess errors)
>> FAIL: g++.dg/template/overload15.C  -std=c++98 (test for excess errors)
>
> But that one is
> LAST_UPDATED: Mon Feb 19 11:29:19 UTC 2018 (revision 257803)
> I've fixed the testcase only in r257818.

I thought that your patch was from earlier.  I'll check again with the
currently running build.

Thanks, David

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

* Re: [committed] Fix overload15.C testcase (PR c++/79064)
  2018-02-19 20:49 ` Jakub Jelinek
@ 2018-02-19 20:31   ` David Edelsohn
  2018-02-19 22:49     ` Jakub Jelinek
  0 siblings, 1 reply; 6+ messages in thread
From: David Edelsohn @ 2018-02-19 20:31 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Martin Sebor, GCC Patches

https://gcc.gnu.org/ml/gcc-testresults/2018-02/msg01247.html

=== g++ tests ===


Running target unix/-m32
...
FAIL: g++.dg/template/overload15.C  -std=c++11 (test for excess errors)
FAIL: g++.dg/template/overload15.C  -std=c++14 (test for excess errors)
FAIL: g++.dg/template/overload15.C  -std=c++98 (test for excess errors)

- David



On Mon, Feb 19, 2018 at 3:28 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Mon, Feb 19, 2018 at 03:20:25PM -0500, David Edelsohn wrote:
>> 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])'
>
> Can't reproduce on powerpc64-linux-gnu:
>
> hostname; md5sum ../../gcc/testsuite/g++.dg/template/overload15.C; make check-c++-all RUNTESTFLAGS='--target_board=unix\{-m32,-m64\} dg.exp=overload15.C'
> gcc1-power7.osuosl.org
> 74f8286a84b07ec4d8ba0b125a014426  ../../gcc/testsuite/g++.dg/template/overload15.C
> make RUNTESTFLAGS="--target_board=unix\{-m32,-m64\} dg.exp=overload15.C --stds=98,11,14,17,2a,concepts" check-g++
> make[1]: Entering directory `/home/jakub/gcc2/obj20/gcc'
> rm -rf testsuite/g++-parallel
> make[2]: Entering directory `/home/jakub/gcc2/obj20/gcc'
> (rootme=`${PWDCMD-pwd}`; export rootme; \
> srcdir=`cd ../../gcc; ${PWDCMD-pwd}` ; export srcdir ; \
> if [ -n "" ] \
>    && [ -n "$GCC_RUNTEST_PARALLELIZE_DIR" ] \
>    && [ -f testsuite/g++-parallel/finished ]; then \
>   rm -rf testsuite/g++; \
> else \
>   cd testsuite/g++; \
>   rm -f tmp-site.exp; \
>   sed '/set tmpdir/ s|testsuite$|testsuite/g++|' \
>         < ../../site.exp > tmp-site.exp; \
>   /bin/sh ${srcdir}/../move-if-change tmp-site.exp site.exp; \
>   EXPECT=`if [ -f ${rootme}/../expect/expect ] ; then echo ${rootme}/../expect/expect ; else echo expect ; fi` ; export EXPECT ; \
>   if [ -f ${rootme}/../expect/expect ] ; then  \
>     TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; ${PWDCMD-pwd}` ; \
>     export TCL_LIBRARY ; \
>   fi ; \
>   `if [ -f ${srcdir}/../dejagnu/runtest ] ; then echo ${srcdir}/../dejagnu/runtest ; else echo runtest; fi` --tool g++ --target_board=unix\{-m32,-m64\} dg.exp=overload15.C --stds=98,11,14,17,2a,concepts; \
>   if [ -n "$GCC_RUNTEST_PARALLELIZE_DIR" ] ; then \
>     touch ${rootme}/testsuite/g++-parallel/finished; \
>   fi ; \
> fi )
> WARNING: Couldn't find the global config file.
> Test Run By jakub on Mon Feb 19 20:27:41 2018
> Native configuration is powerpc64-unknown-linux-gnu
>
>                 === g++ tests ===
>
> Schedule of variations:
>     unix/-m32
>     unix/-m64
>
> Running target unix/-m32
> Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
> Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
> Using /home/jakub/gcc2/gcc/testsuite/config/default.exp as tool-and-target-specific interface file.
> Running /home/jakub/gcc2/gcc/testsuite/g++.dg/dg.exp ...
>
>                 === g++ Summary for unix/-m32 ===
>
> # of expected passes            6
> Running target unix/-m64
> Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
> Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
> Using /home/jakub/gcc2/gcc/testsuite/config/default.exp as tool-and-target-specific interface file.
> Running /home/jakub/gcc2/gcc/testsuite/g++.dg/dg.exp ...
>
>                 === g++ Summary for unix/-m64 ===
>
> # of expected passes            6
>
>                 === g++ Summary ===
>
> # of expected passes            12
> /home/jakub/gcc2/obj20/gcc/testsuite/g++/../../xg++  version 8.0.1 20180214 (experimental) (GCC)
>
> make[2]: Leaving directory `/home/jakub/gcc2/obj20/gcc'
> make[1]: Leaving directory `/home/jakub/gcc2/obj20/gcc'
>
>         Jakub

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

* 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

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 18:52 [committed] Fix overload15.C testcase (PR c++/79064) Jakub Jelinek
2018-02-19 20:20 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

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).