public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix template-params-12f.C on darwin/vxworks (PR debug/77389)
@ 2016-08-29 19:41 Jakub Jelinek
  2016-08-29 21:57 ` Dominique d'Humières
  2016-08-30  0:41 ` Mike Stump
  0 siblings, 2 replies; 5+ messages in thread
From: Jakub Jelinek @ 2016-08-29 19:41 UTC (permalink / raw)
  To: Alexandre Oliva, Dominique d'Humières; +Cc: gcc-patches

Hi!

This testcase expects to find DWARF extensions, but those are disabled by
default on darwin/vxworks because broken tools there don't handle debug info
very well.

I think the following patch (regtested on x86_64-linux and i686-linux)
should fix it, but I have no access to darwin, so can't verify.

Ok for trunk?

2016-08-29  Jakub Jelinek  <jakub@redhat.com>

	PR debug/77389
	* g++.dg/debug/dwarf2/template-params-12f.C: Pass -gno-strict-dwarf
	in dg-options.

--- gcc/testsuite/g++.dg/debug/dwarf2/template-params-12f.C.jj	2016-08-12 11:12:46.000000000 +0200
+++ gcc/testsuite/g++.dg/debug/dwarf2/template-params-12f.C	2016-08-29 12:39:54.562411107 +0200
@@ -1,4 +1,4 @@
-// { dg-options "-gdwarf-2 -dA" }
+// { dg-options "-gdwarf-2 -gno-strict-dwarf -dA" }
 // { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_template_value_param" 1 } }
 // { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_template_value_param\[^\n\]*\n\[^\n\]* DW_AT_name\n\[^\n\]* DW_AT_type\n\[^\n\]*\[^\n\]* DW_AT_location\n\[^\n\]* DW_OP_addr\n\[^\n\]*_ZN1S1fEv\[^\n\]*\n\[^\n\]* DW_OP_stack_value\n\[^\n\]* DW_OP_piece\n\[^\n\]*\n\[^\n\]* DW_OP_lit0\n\[^\n\]* DW_OP_stack_value\n\[^\n\]* DW_OP_piece" 1 } }
 #include "template-params-12.H"

	Jakub

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

* Re: [PATCH] Fix template-params-12f.C on darwin/vxworks (PR debug/77389)
  2016-08-29 19:41 [PATCH] Fix template-params-12f.C on darwin/vxworks (PR debug/77389) Jakub Jelinek
@ 2016-08-29 21:57 ` Dominique d'Humières
  2016-08-30  0:41 ` Mike Stump
  1 sibling, 0 replies; 5+ messages in thread
From: Dominique d'Humières @ 2016-08-29 21:57 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Alexandre Oliva, gcc-patches

Preliminary tests show that the patch fixes the issue.

Thanks,

Dominique

> Le 29 août 2016 à 21:41, Jakub Jelinek <jakub@redhat.com> a écrit :
> 
> Hi!
> 
> This testcase expects to find DWARF extensions, but those are disabled by
> default on darwin/vxworks because broken tools there don't handle debug info
> very well.
> 
> I think the following patch (regtested on x86_64-linux and i686-linux)
> should fix it, but I have no access to darwin, so can't verify.
> 
> Ok for trunk?
> 
> 2016-08-29  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR debug/77389
> 	* g++.dg/debug/dwarf2/template-params-12f.C: Pass -gno-strict-dwarf
> 	in dg-options.
> 
> --- gcc/testsuite/g++.dg/debug/dwarf2/template-params-12f.C.jj	2016-08-12 11:12:46.000000000 +0200
> +++ gcc/testsuite/g++.dg/debug/dwarf2/template-params-12f.C	2016-08-29 12:39:54.562411107 +0200
> @@ -1,4 +1,4 @@
> -// { dg-options "-gdwarf-2 -dA" }
> +// { dg-options "-gdwarf-2 -gno-strict-dwarf -dA" }
> // { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_template_value_param" 1 } }
> // { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_template_value_param\[^\n\]*\n\[^\n\]* DW_AT_name\n\[^\n\]* DW_AT_type\n\[^\n\]*\[^\n\]* DW_AT_location\n\[^\n\]* DW_OP_addr\n\[^\n\]*_ZN1S1fEv\[^\n\]*\n\[^\n\]* DW_OP_stack_value\n\[^\n\]* DW_OP_piece\n\[^\n\]*\n\[^\n\]* DW_OP_lit0\n\[^\n\]* DW_OP_stack_value\n\[^\n\]* DW_OP_piece" 1 } }
> #include "template-params-12.H"
> 
> 	Jakub

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

* Re: [PATCH] Fix template-params-12f.C on darwin/vxworks (PR debug/77389)
  2016-08-29 19:41 [PATCH] Fix template-params-12f.C on darwin/vxworks (PR debug/77389) Jakub Jelinek
  2016-08-29 21:57 ` Dominique d'Humières
@ 2016-08-30  0:41 ` Mike Stump
  2016-09-04 17:45   ` Dominique d'Humières
  1 sibling, 1 reply; 5+ messages in thread
From: Mike Stump @ 2016-08-30  0:41 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Alexandre Oliva, Dominique d'Humières, gcc-patches

On Aug 29, 2016, at 12:41 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> 
> This testcase expects to find DWARF extensions, but those are disabled by
> default on darwin/vxworks because broken tools there don't handle debug info
> very well.
> 
> I think the following patch (regtested on x86_64-linux and i686-linux)
> should fix it, but I have no access to darwin, so can't verify.
> 
> Ok for trunk?

Ok.  :-)

> 
> 2016-08-29  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR debug/77389
> 	* g++.dg/debug/dwarf2/template-params-12f.C: Pass -gno-strict-dwarf
> 	in dg-options.

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

* Re: [PATCH] Fix template-params-12f.C on darwin/vxworks (PR debug/77389)
  2016-08-30  0:41 ` Mike Stump
@ 2016-09-04 17:45   ` Dominique d'Humières
  2016-09-05 23:54     ` Mike Stump
  0 siblings, 1 reply; 5+ messages in thread
From: Dominique d'Humières @ 2016-09-04 17:45 UTC (permalink / raw)
  To: Mike Stump; +Cc: Jakub Jelinek, Alexandre Oliva, gcc-patches

The same should apply to g++.dg/debug/dwarf2/template-params-12g.C:

--- ../_clean/gcc/testsuite/g++.dg/debug/dwarf2/template-params-12g.C	2016-08-12 09:59:34.000000000 +0200
+++ gcc/testsuite/g++.dg/debug/dwarf2/template-params-12g.C	2016-08-30 11:36:48.000000000 +0200
@@ -1,4 +1,4 @@
-// { dg-options "-gdwarf-2 -dA" }
+// { dg-options "-gdwarf-2 -gno-strict-dwarf -dA" }
 // { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_template_value_param" 1 } }
 // { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_template_value_param\[^\n\]*\n\[^\n\]* DW_AT_name\n\[^\n\]* DW_AT_type\n\[^\n\]*\[^\n\]* DW_AT_location\n\[^\n\]* DW_OP_addr\n\[^\n\]*_ZN1B1gEv\[^\n\]*\n\[^\n\]* DW_OP_stack_value\n\[^\n\]* DW_OP_piece\n\[^\n\]*\n\[^\n\]* DW_OP_lit0\n\[^\n\]* DW_OP_stack_value\n\[^\n\]* DW_OP_piece" 1 } }
 #include "template-params-12.H »

Unless someone objects, I’ll commit the patch in the coming days.

I also noticed that the same should apply to g++.dg/debug/dwarf2/imported-decl-2.C (pr57519). Is it OK to commit the following patch to trunk and the gcc-5 and 6 branches?

--- ../_clean/gcc/testsuite/g++.dg/debug/dwarf2/imported-decl-2.C	2015-09-26 23:16:11.000000000 +0200
+++ gcc/testsuite/g++.dg/debug/dwarf2/imported-decl-2.C	2015-09-26 23:16:55.000000000 +0200
@@ -1,5 +1,5 @@
 // { dg-do compile }
-// { dg-options "-gdwarf-2 -dA -O0 -fno-merge-debug-strings" }
+// { dg-options "-gdwarf-2 -gno-strict-dwarf -dA -O0 -fno-merge-debug-strings" }
 
 class AAAA
 {

TIA

Dominique

> Le 30 août 2016 à 02:41, Mike Stump <mikestump@comcast.net> a écrit :
> 
> On Aug 29, 2016, at 12:41 PM, Jakub Jelinek <jakub@redhat.com> wrote:
>> 
>> This testcase expects to find DWARF extensions, but those are disabled by
>> default on darwin/vxworks because broken tools there don't handle debug info
>> very well.
>> 
>> I think the following patch (regtested on x86_64-linux and i686-linux)
>> should fix it, but I have no access to darwin, so can't verify.
>> 
>> Ok for trunk?
> 
> Ok.  :-)
> 
>> 
>> 2016-08-29  Jakub Jelinek  <jakub@redhat.com>
>> 
>> 	PR debug/77389
>> 	* g++.dg/debug/dwarf2/template-params-12f.C: Pass -gno-strict-dwarf
>> 	in dg-options.

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

* Re: [PATCH] Fix template-params-12f.C on darwin/vxworks (PR debug/77389)
  2016-09-04 17:45   ` Dominique d'Humières
@ 2016-09-05 23:54     ` Mike Stump
  0 siblings, 0 replies; 5+ messages in thread
From: Mike Stump @ 2016-09-05 23:54 UTC (permalink / raw)
  To: Dominique d'Humières; +Cc: Jakub Jelinek, Alexandre Oliva, gcc-patches

On Sep 4, 2016, at 10:23 AM, Dominique d'Humières <dominiq@lps.ens.fr> wrote:
> 
> The same should apply to g++.dg/debug/dwarf2/template-params-12g.C:
> 
> --- ../_clean/gcc/testsuite/g++.dg/debug/dwarf2/template-params-12g.C	2016-08-12 09:59:34.000000000 +0200
> +++ gcc/testsuite/g++.dg/debug/dwarf2/template-params-12g.C	2016-08-30 11:36:48.000000000 +0200
> @@ -1,4 +1,4 @@
> -// { dg-options "-gdwarf-2 -dA" }
> +// { dg-options "-gdwarf-2 -gno-strict-dwarf -dA" }
> // { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_template_value_param" 1 } }
> // { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_template_value_param\[^\n\]*\n\[^\n\]* DW_AT_name\n\[^\n\]* DW_AT_type\n\[^\n\]*\[^\n\]* DW_AT_location\n\[^\n\]* DW_OP_addr\n\[^\n\]*_ZN1B1gEv\[^\n\]*\n\[^\n\]* DW_OP_stack_value\n\[^\n\]* DW_OP_piece\n\[^\n\]*\n\[^\n\]* DW_OP_lit0\n\[^\n\]* DW_OP_stack_value\n\[^\n\]* DW_OP_piece" 1 } }
> #include "template-params-12.H »
> 
> Unless someone objects, I’ll commit the patch in the coming days.

Ok.

> I also noticed that the same should apply to g++.dg/debug/dwarf2/imported-decl-2.C (pr57519). Is it OK to commit the following patch to trunk and the gcc-5 and 6 branches?

Ok.

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

end of thread, other threads:[~2016-09-05 23:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-29 19:41 [PATCH] Fix template-params-12f.C on darwin/vxworks (PR debug/77389) Jakub Jelinek
2016-08-29 21:57 ` Dominique d'Humières
2016-08-30  0:41 ` Mike Stump
2016-09-04 17:45   ` Dominique d'Humières
2016-09-05 23:54     ` Mike Stump

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