testsuite: Fix g++.dg/analyzer/pr93212.C with check-c++-all

Message ID 20200213071108.GC17695@tucnak
State New
Headers show
Series
  • testsuite: Fix g++.dg/analyzer/pr93212.C with check-c++-all
Related show

Commit Message

Jakub Jelinek Feb. 13, 2020, 7:11 a.m.
On Thu, Feb 06, 2020 at 03:27:29PM -0500, David Malcolm wrote:
> gcc/testsuite/ChangeLog:

> 	PR analyzer/93212

> 	* g++.dg/analyzer/analyzer.exp: New subdirectory and .exp suite.

> 	* g++.dg/analyzer/malloc.C: New test.

> 	* g++.dg/analyzer/pr93212.C: New test.


The test FAILs with c++11:
.../gcc/testsuite/g++.dg/analyzer/pr93212.C:4:1: error: 'lol' function uses 'auto' type specifier without trailing return type
.../gcc/testsuite/g++.dg/analyzer/pr93212.C:4:1: note: deduced return type only available with '-std=c++14' or '-std=gnu++14'

Fixed thusly, regtested on x86_64-linux, committed to trunk as obvious.

2020-02-13  Jakub Jelinek  <jakub@redhat.com>

	* g++.dg/analyzer/pr93212.C: Require c++14 rather than c++11.


	Jakub

Comments

David Malcolm Feb. 13, 2020, 9:23 a.m. | #1
On Thu, 2020-02-13 at 08:11 +0100, Jakub Jelinek wrote:
> On Thu, Feb 06, 2020 at 03:27:29PM -0500, David Malcolm wrote:

> > gcc/testsuite/ChangeLog:

> > 	PR analyzer/93212

> > 	* g++.dg/analyzer/analyzer.exp: New subdirectory and .exp

> > suite.

> > 	* g++.dg/analyzer/malloc.C: New test.

> > 	* g++.dg/analyzer/pr93212.C: New test.

> 

> The test FAILs with c++11:

> .../gcc/testsuite/g++.dg/analyzer/pr93212.C:4:1: error: 'lol'

> function uses 'auto' type specifier without trailing return type

> .../gcc/testsuite/g++.dg/analyzer/pr93212.C:4:1: note: deduced return

> type only available with '-std=c++14' or '-std=gnu++14'

> 

> Fixed thusly, regtested on x86_64-linux, committed to trunk as

> obvious.


Thanks Jakub, and sorry for the failure.

I did some digging into why this got through my testing.

My standard patch testing involves a bootstrap build with these three
Makefile targets in sequence:

  make all
  make install
  make check

each teed to a logfile, and with a suitable -j

I hadn't noticed the check-c++-all in cp/Make-lang.in.

I've been using "--target_board=unix\{-m32,-m64\}" in my RUNTESTFLAGS
during development of a patch, but I notice now that I didn't have it
in my bootstrap testing.  I've fixed that, and added check-c++-all.

Are there any other Makefile targets I should be testing with?


Thanks
Dave

Patch

--- gcc/testsuite/g++.dg/analyzer/pr93212.C
+++ gcc/testsuite/g++.dg/analyzer/pr93212.C
@@ -1,4 +1,4 @@ 
-// { dg-do compile { target c++11 } }
+// { dg-do compile { target c++14 } }
 
 #include <iostream>
 auto lol()