public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/44641]  New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
@ 2010-06-22 22:55 jyasskin at gmail dot com
  2010-07-15  0:35 ` [Bug c++/44641] " jyasskin at gmail dot com
                   ` (18 more replies)
  0 siblings, 19 replies; 30+ messages in thread
From: jyasskin at gmail dot com @ 2010-06-22 22:55 UTC (permalink / raw)
  To: gcc-bugs

$ cat test.ii
# 1 "bad.h" 1
template <class A> struct MisplacedDbg;
# 1 "good.cc"
struct Arg;
typedef MisplacedDbg<Arg> Typedef;
template<typename T> struct Base  {
  virtual ~Base() {
  }
};
template <class A> struct MisplacedDbg : public Base<int> {
};
static MisplacedDbg<Arg> static_var;
$ g++-4.6svn -c -g test.ii
$ objdump -d -l test.o|grep -B2 'bad.h:1'
0000000000000000 <_ZN12MisplacedDbgI3ArgEC1Ev>:
MisplacedDbg():
/home/jyasskin/tmp/bad.h:1
--
0000000000000000 <_ZN12MisplacedDbgI3ArgED1Ev>:
~MisplacedDbg():
/home/jyasskin/tmp/bad.h:1
$

This causes problems for Gold's ODR violation detector.


-- 
           Summary: Generated constructors and destructors get wrong debug
                    location when a typedef uses a forward declaration of
                    the type before the definition
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jyasskin at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
  2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
@ 2010-07-15  0:35 ` jyasskin at gmail dot com
  2010-07-20  0:43 ` jyasskin at gmail dot com
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: jyasskin at gmail dot com @ 2010-07-15  0:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jyasskin at gmail dot com  2010-07-15 00:34 -------
My current guess is that the bug is at parser.c:16741, at the end of
cp_parser_class_head():
    DECL_SOURCE_LOCATION (TYPE_NAME (type)) = type_start_token->location;

This updates the template's location, but it doesn't update the locations of
any instantiations that have already been created. I'm going to try to find the
existing instantiations to update them there.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
  2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
  2010-07-15  0:35 ` [Bug c++/44641] " jyasskin at gmail dot com
@ 2010-07-20  0:43 ` jyasskin at gmail dot com
  2010-07-20 20:17 ` jyasskin at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: jyasskin at gmail dot com @ 2010-07-20  0:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jyasskin at gmail dot com  2010-07-20 00:43 -------
Patch at http://gcc.gnu.org/ml/gcc-patches/2010-07/msg01538.html. Please
review.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
  2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
  2010-07-15  0:35 ` [Bug c++/44641] " jyasskin at gmail dot com
  2010-07-20  0:43 ` jyasskin at gmail dot com
@ 2010-07-20 20:17 ` jyasskin at gcc dot gnu dot org
  2010-07-20 20:22 ` jyasskin at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: jyasskin at gcc dot gnu dot org @ 2010-07-20 20:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jyasskin at gcc dot gnu dot org  2010-07-20 20:17 -------
Subject: Bug 44641

Author: jyasskin
Date: Tue Jul 20 20:16:53 2010
New Revision: 162349

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162349
Log:
PR c++/44641
        * gcc/cp/pt.c (instantiate_class_template): Propagate the
        template's location to its instance.

        * gcc/testsuite/lib/scanasm.exp (dg-function-on-line): Test
        that a function is defined on the current line.
        * gcc/testsuite/g++.dg/debug/dwarf2/lineno-simple1.C: New.
        Line number sanity test.
        * gcc/testsuite/g++.dg/debug/dwarf2/pr44641.C: New.



Added:
    trunk/gcc/testsuite/g++.dg/debug/dwarf2/lineno-simple1.C
    trunk/gcc/testsuite/g++.dg/debug/dwarf2/pr44641.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/lib/scanasm.exp


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
  2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
                   ` (2 preceding siblings ...)
  2010-07-20 20:17 ` jyasskin at gcc dot gnu dot org
@ 2010-07-20 20:22 ` jyasskin at gcc dot gnu dot org
  2010-07-21 13:30 ` hjl dot tools at gmail dot com
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: jyasskin at gcc dot gnu dot org @ 2010-07-20 20:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jyasskin at gcc dot gnu dot org  2010-07-20 20:22 -------
Fixed by r162349.


-- 

jyasskin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
  2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
                   ` (3 preceding siblings ...)
  2010-07-20 20:22 ` jyasskin at gcc dot gnu dot org
@ 2010-07-21 13:30 ` hjl dot tools at gmail dot com
  2010-07-21 16:44 ` jyasskin at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-07-21 13:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from hjl dot tools at gmail dot com  2010-07-21 13:30 -------
Those tests failed on Linux/ia64:

FAIL: g++.dg/debug/dwarf2/lineno-simple1.C scan-assembler
_ZN1C3fooEv:[^\\t]*(\\t.file[^\\t]*)?\\t# \\S*:6\\n
FAIL: g++.dg/debug/dwarf2/lineno-simple1.C scan-assembler
_ZN1CC[12]Ev:[^\\t]*(\\t.file[^\\t]*)?\\t# \\S*:4\\n
FAIL: g++.dg/debug/dwarf2/lineno-simple1.C scan-assembler
main:[^\\t]*(\\t.file[^\\t]*)?\\t# \\S*:12\\n
FAIL: g++.dg/debug/dwarf2/pr44641.C scan-assembler
_ZN12MisplacedDbgI3ArgEC[12]Ev:[^\\t]*(\\t.file[^\\t]*)?\\t# \\S*:34\\n
FAIL: g++.dg/debug/dwarf2/pr44641.C scan-assembler
_ZN12MisplacedDbgI3ArgED0Ev:[^\\t]*(\\t.file[^\\t]*)?\\t# \\S*:34\\n
FAIL: g++.dg/debug/dwarf2/pr44641.C scan-assembler
_ZN12MisplacedDbgI4FullEC[12]Ev:[^\\t]*(\\t.file[^\\t]*)?\\t# \\S*:21\\n
FAIL: g++.dg/debug/dwarf2/pr44641.C scan-assembler
_ZN12MisplacedDbgI4FullED0Ev:[^\\t]*(\\t.file[^\\t]*)?\\t# \\S*:21\\n
FAIL: g++.dg/debug/dwarf2/pr44641.C scan-assembler
_ZN12MisplacedDbgIP3ArgEC[12]Ev:[^\\t]*(\\t.file[^\\t]*)?\\t# \\S*:28\\n
FAIL: g++.dg/debug/dwarf2/pr44641.C scan-assembler
_ZN12MisplacedDbgIP3ArgED0Ev:[^\\t]*(\\t.file[^\\t]*)?\\t# \\S*:28\\n


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|FIXED                       |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
  2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
                   ` (4 preceding siblings ...)
  2010-07-21 13:30 ` hjl dot tools at gmail dot com
@ 2010-07-21 16:44 ` jyasskin at gcc dot gnu dot org
  2010-07-21 16:50 ` hjl dot tools at gmail dot com
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: jyasskin at gcc dot gnu dot org @ 2010-07-21 16:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jyasskin at gcc dot gnu dot org  2010-07-21 16:44 -------
Is the problem a bad mangling or bad line numbers? In a built tree, could you
run:
  $objdir/gcc/cc1plus -g -dA
$srcdir/gcc/testsuite/g++.dg/debug/dwarf2/pr44641.C -o pr44641.s
and send me or attach pr44641.s?

Feel free to xfail this in the mean time, or if you send me your triple I'll do
it, so that it's not polluting your test results.


-- 

jyasskin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hjl dot tools at gmail dot
                   |                            |com
         AssignedTo|unassigned at gcc dot gnu   |jyasskin at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-07-21 16:44:41
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
  2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
                   ` (5 preceding siblings ...)
  2010-07-21 16:44 ` jyasskin at gcc dot gnu dot org
@ 2010-07-21 16:50 ` hjl dot tools at gmail dot com
  2010-07-21 18:42 ` jyasskin at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-07-21 16:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from hjl dot tools at gmail dot com  2010-07-21 16:50 -------
(In reply to comment #6)
> Is the problem a bad mangling or bad line numbers? In a built tree, could you
> run:
>   $objdir/gcc/cc1plus -g -dA
> $srcdir/gcc/testsuite/g++.dg/debug/dwarf2/pr44641.C -o pr44641.s
> and send me or attach pr44641.s?
> 
> Feel free to xfail this in the mean time, or if you send me your triple I'll do
> it, so that it's not polluting your test results.
> 

You can build a cross compiler for ia64-unknown-linux-gnu
to see it for yourself.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
  2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
                   ` (6 preceding siblings ...)
  2010-07-21 16:50 ` hjl dot tools at gmail dot com
@ 2010-07-21 18:42 ` jyasskin at gcc dot gnu dot org
  2010-07-21 18:47 ` jyasskin at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: jyasskin at gcc dot gnu dot org @ 2010-07-21 18:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from jyasskin at gcc dot gnu dot org  2010-07-21 18:42 -------
Despite your remarkably rude response, I've mailed a fix:
http://gcc.gnu.org/ml/gcc-patches/2010-07/msg01665.html


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
  2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
                   ` (7 preceding siblings ...)
  2010-07-21 18:42 ` jyasskin at gcc dot gnu dot org
@ 2010-07-21 18:47 ` jyasskin at gcc dot gnu dot org
  2010-07-21 18:48 ` jyasskin at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: jyasskin at gcc dot gnu dot org @ 2010-07-21 18:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from jyasskin at gcc dot gnu dot org  2010-07-21 18:47 -------
Subject: Bug 44641

Author: jyasskin
Date: Wed Jul 21 18:46:40 2010
New Revision: 162383

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162383
Log:
IA64 uses // instead of # for comments in its assembly file.

        PR c++/44641
        * lib/scanasm.exp (dg-function-on-line): Fix regex for IA64's
        comments.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/lib/scanasm.exp


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
  2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
                   ` (8 preceding siblings ...)
  2010-07-21 18:47 ` jyasskin at gcc dot gnu dot org
@ 2010-07-21 18:48 ` jyasskin at gcc dot gnu dot org
  2010-07-21 19:41 ` manu at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: jyasskin at gcc dot gnu dot org @ 2010-07-21 18:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from jyasskin at gcc dot gnu dot org  2010-07-21 18:48 -------
Fixed by r162383.


-- 

jyasskin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
  2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
                   ` (9 preceding siblings ...)
  2010-07-21 18:48 ` jyasskin at gcc dot gnu dot org
@ 2010-07-21 19:41 ` manu at gcc dot gnu dot org
  2010-07-27  9:05 ` ubizjak at gmail dot com
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: manu at gcc dot gnu dot org @ 2010-07-21 19:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from manu at gcc dot gnu dot org  2010-07-21 19:40 -------
(In reply to comment #8)
> Despite your remarkably rude response, I've mailed a fix:
> http://gcc.gnu.org/ml/gcc-patches/2010-07/msg01665.html

Don't take it personally. Some of us are not native English-speakers, so we
miss some nuances of English languages. On the other hand, others often use a
matter-of-fact tone that is unintentionally rude. Finally, there is for sure
rude people around. Since it is hard to differentiate between these three cases
without starting an argument, just ignore it altogether.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
  2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
                   ` (10 preceding siblings ...)
  2010-07-21 19:41 ` manu at gcc dot gnu dot org
@ 2010-07-27  9:05 ` ubizjak at gmail dot com
  2010-07-28  6:24 ` ubizjak at gmail dot com
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: ubizjak at gmail dot com @ 2010-07-27  9:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from ubizjak at gmail dot com  2010-07-27 09:05 -------
Created an attachment (id=21324)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21324&action=view)
alpha asm dump

This test still fails on alpha with attached asm dump.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
  2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
                   ` (11 preceding siblings ...)
  2010-07-27  9:05 ` ubizjak at gmail dot com
@ 2010-07-28  6:24 ` ubizjak at gmail dot com
  2010-08-04 14:04 ` ubizjak at gmail dot com
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: ubizjak at gmail dot com @ 2010-07-28  6:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from ubizjak at gmail dot com  2010-07-28 06:24 -------
Reopened.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ubizjak at gmail dot com
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
  2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
                   ` (12 preceding siblings ...)
  2010-07-28  6:24 ` ubizjak at gmail dot com
@ 2010-08-04 14:04 ` ubizjak at gmail dot com
  2010-08-04 14:20 ` uros at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: ubizjak at gmail dot com @ 2010-08-04 14:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #14 from ubizjak at gmail dot com  2010-08-04 14:04 -------
Following patch fixes my failures:

Index: lib/scanasm.exp
===================================================================
--- lib/scanasm.exp     (revision 162854)
+++ lib/scanasm.exp     (working copy)
@@ -316,7 +316,7 @@
        }
     }

-    set pattern [format {%s:[^\t]*(\t.file[^\t]*)?\t[^:]+:%d\n} \
+    set pattern [format {%s:[^\t]*(\t.(frame|mask|file)[^\t]*)*\t[^:]+:%d\n} \
                  $symbol $line]

     # The lack of spaces around $pattern is important, since they'd


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
  2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
                   ` (13 preceding siblings ...)
  2010-08-04 14:04 ` ubizjak at gmail dot com
@ 2010-08-04 14:20 ` uros at gcc dot gnu dot org
  2010-08-04 14:28 ` ubizjak at gmail dot com
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: uros at gcc dot gnu dot org @ 2010-08-04 14:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #15 from uros at gcc dot gnu dot org  2010-08-04 14:19 -------
Subject: Bug 44641

Author: uros
Date: Wed Aug  4 14:19:01 2010
New Revision: 162866

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162866
Log:
        PR c++/44641
        * lib/scanasm.exp (dg-function-on-line): Expand regex to also ignore
        .frame and .mask assembler directives.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/lib/scanasm.exp


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
  2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
                   ` (14 preceding siblings ...)
  2010-08-04 14:20 ` uros at gcc dot gnu dot org
@ 2010-08-04 14:28 ` ubizjak at gmail dot com
  2010-08-09  0:19 ` danglin at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 30+ messages in thread
From: ubizjak at gmail dot com @ 2010-08-04 14:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #16 from ubizjak at gmail dot com  2010-08-04 14:28 -------
Fixed (for alpha) by extending regexp in dg-function-on-line procedure.


-- 

ubizjak at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.6.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
  2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
                   ` (15 preceding siblings ...)
  2010-08-04 14:28 ` ubizjak at gmail dot com
@ 2010-08-09  0:19 ` danglin at gcc dot gnu dot org
  2010-08-09  0:35 ` dave at hiauly1 dot hia dot nrc dot ca
  2010-08-10 22:14 ` danglin at gcc dot gnu dot org
  18 siblings, 0 replies; 30+ messages in thread
From: danglin at gcc dot gnu dot org @ 2010-08-09  0:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #17 from danglin at gcc dot gnu dot org  2010-08-09 00:19 -------
The match string doesn't work on hppa-linux:

FAIL: g++.dg/debug/dwarf2/lineno-simple1.C scan-assembler
_ZN1CC[12]Ev:[^\\t]*(\
\t.(frame|mask|file)[^\\t]*)*\\t[^:]+:4\\n
FAIL: g++.dg/debug/dwarf2/lineno-simple1.C scan-assembler
_ZN1C3fooEv:[^\\t]*(\\
t.(frame|mask|file)[^\\t]*)*\\t[^:]+:6\\nFAIL:
g++.dg/debug/dwarf2/lineno-simple1.C scan-assembler main:[^\\t]*(\\t.(fram
e|mask|file)[^\\t]*)*\\t[^:]+:12\\n
FAIL: g++.dg/debug/dwarf2/nested-2.C scan-assembler
[^\n\r]*\\(DIE[^\n\r]*DW_TAG
_structure_type\\)[\n\r]+[^\n\r]*"S\\\\0"[ \t]+(#|//)[
\t]+DW_AT_name[\n\r]+(.*)
?\\(DIE[^\n\r]*DW_TAG_structure_type\\)[\n\r]+[^\n\r]*"T<int>\\\\0"[
\t]+(.*)?\\
(DIE[^\n\r]*DW_TAG_template_type_param\\)[\n\r]+[^\n\r]*[\n\r]+[^\n\r]*[\n\r]+[^
\n\r]*(#|//)[ \t]+end of children of DIE[^\n\r]*[\n\r]+[^\n\r]*end of children
o
f DIE[^\n\r]*
FAIL: g++.dg/debug/dwarf2/pr44641.C scan-assembler
_ZN12MisplacedDbgI4FullEC[12]
Ev:[^\\t]*(\\t.(frame|mask|file)[^\\t]*)*\\t[^:]+:21\\n
FAIL: g++.dg/debug/dwarf2/pr44641.C scan-assembler
_ZN12MisplacedDbgI4FullED0Ev:
[^\\t]*(\\t.(frame|mask|file)[^\\t]*)*\\t[^:]+:21\\n
FAIL: g++.dg/debug/dwarf2/pr44641.C scan-assembler
_ZN12MisplacedDbgIP3ArgEC[12]
Ev:[^\\t]*(\\t.(frame|mask|file)[^\\t]*)*\\t[^:]+:28\\n
FAIL: g++.dg/debug/dwarf2/pr44641.C scan-assembler
_ZN12MisplacedDbgIP3ArgED0Ev:
[^\\t]*(\\t.(frame|mask|file)[^\\t]*)*\\t[^:]+:28\\nFAIL:
g++.dg/debug/dwarf2/pr44641.C scan-assembler
_ZN12MisplacedDbgI3ArgEC[12]Ev:[^\\t]*(\\t.(frame|mask|file)[^\\t]*)*\\t[^:]+:34\\n
FAIL: g++.dg/debug/dwarf2/pr44641.C scan-assembler
_ZN12MisplacedDbgI3ArgED0Ev:[^\\t]*(\\t.(frame|mask|file)[^\\t]*)*\\t[^:]+:34\\n


-- 

danglin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |danglin at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
  2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
                   ` (16 preceding siblings ...)
  2010-08-09  0:19 ` danglin at gcc dot gnu dot org
@ 2010-08-09  0:35 ` dave at hiauly1 dot hia dot nrc dot ca
  2010-08-10 22:14 ` danglin at gcc dot gnu dot org
  18 siblings, 0 replies; 30+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2010-08-09  0:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #18 from dave at hiauly1 dot hia dot nrc dot ca  2010-08-09 00:35 -------
Subject: Re:  Generated constructors and destructors get
        wrong debug location when a typedef uses a forward declaration of
        the type before the definition

On Mon, 09 Aug 2010, danglin at gcc dot gnu dot org wrote:

> FAIL: g++.dg/debug/dwarf2/nested-2.C scan-assembler
> [^\n\r]*\\(DIE[^\n\r]*DW_TAG
> _structure_type\\)[\n\r]+[^\n\r]*"S\\\\0"[ \t]+(#|//)[
> \t]+DW_AT_name[\n\r]+(.*)
> ?\\(DIE[^\n\r]*DW_TAG_structure_type\\)[\n\r]+[^\n\r]*"T<int>\\\\0"[
> \t]+(.*)?\\
> (DIE[^\n\r]*DW_TAG_template_type_param\\)[\n\r]+[^\n\r]*[\n\r]+[^\n\r]*[\n\r]+[^
> \n\r]*(#|//)[ \t]+end of children of DIE[^\n\r]*[\n\r]+[^\n\r]*end of children
> o
> f DIE[^\n\r]*

Sorry, different issue.

Attached .s.

Probably, similar problems are present on hppa64-hp-hpux11.11 but bootstrap
is currently broken.


------- Comment #19 from dave at hiauly1 dot hia dot nrc dot ca  2010-08-09 00:35 -------
Created an attachment (id=21440)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21440&action=view)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
  2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
                   ` (17 preceding siblings ...)
  2010-08-09  0:35 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2010-08-10 22:14 ` danglin at gcc dot gnu dot org
  18 siblings, 0 replies; 30+ messages in thread
From: danglin at gcc dot gnu dot org @ 2010-08-10 22:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #20 from danglin at gcc dot gnu dot org  2010-08-10 22:13 -------
Test still fails on hppa-linux.


-- 

danglin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
       [not found] <bug-44641-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2011-12-08 20:37 ` pinskia at gcc dot gnu.org
@ 2013-11-08 10:56 ` paolo.carlini at oracle dot com
  9 siblings, 0 replies; 30+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-11-08 10:56 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
                 CC|gcc-bugs at gcc dot gnu.org        |
         Resolution|---                         |FIXED
   Target Milestone|---                         |4.6.0

--- Comment #29 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Thus fixed for 4.6.0, right?


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
       [not found] <bug-44641-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2011-12-08 20:18 ` pinskia at gcc dot gnu.org
@ 2011-12-08 20:37 ` pinskia at gcc dot gnu.org
  2013-11-08 10:56 ` paolo.carlini at oracle dot com
  9 siblings, 0 replies; 30+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-08 20:37 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641

--- Comment #28 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-08 20:18:03 UTC ---
(In reply to comment #27)
> is what we get on mips64-linux-gnu.  The only difference between this and the
> IRIX one is the .cfi_startproc .

Submitted a fix: http://gcc.gnu.org/ml/gcc-patches/2011-12/msg00600.html


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
       [not found] <bug-44641-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2011-12-08 20:03 ` pinskia at gcc dot gnu.org
@ 2011-12-08 20:18 ` pinskia at gcc dot gnu.org
  2011-12-08 20:37 ` pinskia at gcc dot gnu.org
  2013-11-08 10:56 ` paolo.carlini at oracle dot com
  9 siblings, 0 replies; 30+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-08 20:18 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641

--- Comment #27 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-08 20:05:24 UTC ---
    .loc 1 13 0
    .cfi_startproc
    .set    nomips16
    .ent    main
    .type    main, @function
main:
is what we get on mips64-linux-gnu.  The only difference between this and the
IRIX one is the .cfi_startproc .


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
       [not found] <bug-44641-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2011-04-28 16:34 ` rguenth at gcc dot gnu.org
@ 2011-12-08 20:03 ` pinskia at gcc dot gnu.org
  2011-12-08 20:18 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 30+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-08 20:03 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641

--- Comment #26 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-08 19:58:38 UTC ---
(In reply to comment #23)
> g++.dg/debug/dwarf2/lineno-simple1.C also FAILs on IRIX 6.5, as does
> g++.dg/debug/dwarf2/pr46527.C for what seems to be the same reason:

They also fail on mips64-linux-gnu too.


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
       [not found] <bug-44641-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2011-03-25 20:01 ` jakub at gcc dot gnu.org
@ 2011-04-28 16:34 ` rguenth at gcc dot gnu.org
  2011-12-08 20:03 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 30+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-04-28 16:34 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.1                       |---


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
       [not found] <bug-44641-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2011-01-21 12:38 ` ro at gcc dot gnu.org
@ 2011-03-25 20:01 ` jakub at gcc dot gnu.org
  2011-04-28 16:34 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 30+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-25 20:01 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.0                       |4.6.1

--- Comment #25 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-25 19:52:54 UTC ---
GCC 4.6.0 is being released, adjusting target milestone.


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
       [not found] <bug-44641-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2011-01-21 12:36 ` ro at gcc dot gnu.org
@ 2011-01-21 12:38 ` ro at gcc dot gnu.org
  2011-03-25 20:01 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 30+ messages in thread
From: ro at gcc dot gnu.org @ 2011-01-21 12:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641

--- Comment #24 from Rainer Orth <ro at gcc dot gnu.org> 2011-01-21 11:54:34 UTC ---
Created attachment 23060
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23060
IRIX 6.5 (N32) assembler output


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
       [not found] <bug-44641-4@http.gcc.gnu.org/bugzilla/>
  2010-12-09 14:43 ` danglin at gcc dot gnu.org
  2010-12-09 14:52 ` danglin at gcc dot gnu.org
@ 2011-01-21 12:36 ` ro at gcc dot gnu.org
  2011-01-21 12:38 ` ro at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 30+ messages in thread
From: ro at gcc dot gnu.org @ 2011-01-21 12:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ro at gcc dot gnu.org

--- Comment #23 from Rainer Orth <ro at gcc dot gnu.org> 2011-01-21 11:53:44 UTC ---
g++.dg/debug/dwarf2/lineno-simple1.C also FAILs on IRIX 6.5, as does
g++.dg/debug/dwarf2/pr46527.C for what seems to be the same reason:

FAIL: g++.dg/debug/dwarf2/lineno-simple1.C scan-assembler
main:[^\\\\t]*(\\\\t.(fnstart|frame|mask|file)[^\\\\t]*)*\\\\t[^:]+:12\\\\n

The code around main looks like this:

         #
/vol/gcc/src/hg/trunk/local/gcc/testsuite/g++.dg/debug/dwarf2/lineno-
simple1.C:12
        .loc 1 12 0
        .set    nomips16
        .ent    main
        .type   main, @function
main:
        .frame  $fp,16,$31              # vars= 0, regs= 1/0, args= 0, gp= 0
        .mask   0x40000000,-8
        .fmask  0x00000000,0

I'm attaching the complete assembler output.


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
       [not found] <bug-44641-4@http.gcc.gnu.org/bugzilla/>
  2010-12-09 14:43 ` danglin at gcc dot gnu.org
@ 2010-12-09 14:52 ` danglin at gcc dot gnu.org
  2011-01-21 12:36 ` ro at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 30+ messages in thread
From: danglin at gcc dot gnu.org @ 2010-12-09 14:52 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641

--- Comment #22 from John David Anglin <danglin at gcc dot gnu.org> 2010-12-09 14:51:41 UTC ---
Test case fixed on hppa*-*-*.


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

* [Bug c++/44641] Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition
       [not found] <bug-44641-4@http.gcc.gnu.org/bugzilla/>
@ 2010-12-09 14:43 ` danglin at gcc dot gnu.org
  2010-12-09 14:52 ` danglin at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 30+ messages in thread
From: danglin at gcc dot gnu.org @ 2010-12-09 14:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44641

--- Comment #21 from John David Anglin <danglin at gcc dot gnu.org> 2010-12-09 14:43:09 UTC ---
Author: danglin
Date: Thu Dec  9 14:43:03 2010
New Revision: 167638

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167638
Log:
    PR c++/44641
    * lib/scanasm.exp (dg-function-on-line): Add match pattern for
    hppa*-*-*.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/lib/scanasm.exp


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

end of thread, other threads:[~2013-11-08 10:56 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-22 22:55 [Bug c++/44641] New: Generated constructors and destructors get wrong debug location when a typedef uses a forward declaration of the type before the definition jyasskin at gmail dot com
2010-07-15  0:35 ` [Bug c++/44641] " jyasskin at gmail dot com
2010-07-20  0:43 ` jyasskin at gmail dot com
2010-07-20 20:17 ` jyasskin at gcc dot gnu dot org
2010-07-20 20:22 ` jyasskin at gcc dot gnu dot org
2010-07-21 13:30 ` hjl dot tools at gmail dot com
2010-07-21 16:44 ` jyasskin at gcc dot gnu dot org
2010-07-21 16:50 ` hjl dot tools at gmail dot com
2010-07-21 18:42 ` jyasskin at gcc dot gnu dot org
2010-07-21 18:47 ` jyasskin at gcc dot gnu dot org
2010-07-21 18:48 ` jyasskin at gcc dot gnu dot org
2010-07-21 19:41 ` manu at gcc dot gnu dot org
2010-07-27  9:05 ` ubizjak at gmail dot com
2010-07-28  6:24 ` ubizjak at gmail dot com
2010-08-04 14:04 ` ubizjak at gmail dot com
2010-08-04 14:20 ` uros at gcc dot gnu dot org
2010-08-04 14:28 ` ubizjak at gmail dot com
2010-08-09  0:19 ` danglin at gcc dot gnu dot org
2010-08-09  0:35 ` dave at hiauly1 dot hia dot nrc dot ca
2010-08-10 22:14 ` danglin at gcc dot gnu dot org
     [not found] <bug-44641-4@http.gcc.gnu.org/bugzilla/>
2010-12-09 14:43 ` danglin at gcc dot gnu.org
2010-12-09 14:52 ` danglin at gcc dot gnu.org
2011-01-21 12:36 ` ro at gcc dot gnu.org
2011-01-21 12:38 ` ro at gcc dot gnu.org
2011-03-25 20:01 ` jakub at gcc dot gnu.org
2011-04-28 16:34 ` rguenth at gcc dot gnu.org
2011-12-08 20:03 ` pinskia at gcc dot gnu.org
2011-12-08 20:18 ` pinskia at gcc dot gnu.org
2011-12-08 20:37 ` pinskia at gcc dot gnu.org
2013-11-08 10:56 ` paolo.carlini at oracle dot com

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