[Bug c++/18556] [4.0 Regression] C++ debug is broken

2005-07-22 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-22 
21:02 ---
Please file a new bug.

-- 
   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED


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


[Bug c++/18556] [4.0 Regression] C++ debug is broken

2005-07-22 Thread mark at codesourcery dot com

--- Additional Comments From mark at codesourcery dot com  2005-07-22 20:51 
---
Subject: Re:  [4.0 Regression] C++ debug is broken

hjl at lucon dot org wrote:
> --- Additional Comments From hjl at lucon dot org  2005-07-22 20:45 
> ---
> The bug came back with the patch for bug 21828.

Not for me it doesn't.

Compiling eh53.C with -g does not result in any references to 
_ZTI7zeroset.  That string appears nowhere in the resulting .s file.

So, unlesss you are seeing different behavior, please reclose this PR.

If there's some new problem, file a new PR.



-- 


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


[Bug c++/18556] [4.0 Regression] C++ debug is broken

2005-07-22 Thread hjl at lucon dot org

--- Additional Comments From hjl at lucon dot org  2005-07-22 20:50 ---
Now, I got the same failure on Linux/ia32, Linux/ia64 and Linux/x86_64. Mark,
please make sure you have the current binutils. I think binutils 2.16.1 should
be enough to see the bug.

-- 


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


[Bug c++/18556] [4.0 Regression] C++ debug is broken

2005-07-22 Thread hjl at lucon dot org

--- Additional Comments From hjl at lucon dot org  2005-07-22 20:45 ---
The bug came back with the patch for bug 21828.

-- 
   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |


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


[Bug c++/18556] [4.0 Regression] C++ debug is broken

2004-11-25 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-11-25 
17:12 ---
Subject: Bug 18556

CVSROOT:/cvs/gcc
Module name:gcc
Changes by: [EMAIL PROTECTED]   2004-11-25 17:11:37

Modified files:
gcc: ChangeLog c-common.c c-common.h c-typeck.c 
 toplev.c 
gcc/testsuite  : ChangeLog 
gcc/testsuite/g++.dg/expr: unary2.C 
gcc/testsuite/g++.dg/ext: lvaddr.C 
gcc/testsuite/g++.dg/opt: pr7503-3.C 
gcc/testsuite/g++.old-deja/g++.other: friend7.C 
gcc/cp : ChangeLog class.c cp-tree.h decl.c 
 name-lookup.c pt.c tree.c typeck.c 
Added files:
gcc/testsuite/g++.dg/template: crash28.C 
gcc/testsuite/g++.dg/expr: return1.C 
gcc/testsuite/g++.dg/parse: qualified3.C 

Log message:
PR c++/18001
* c-common.h (lvalue_use): Move here from c-ctypeck.c.
(lvalue_or_else): Declare.
* c-common.c (lvalue_or_else): Move here from c-typeck.c.
* c-typeck.c (lvalue_use): Remove.
(lvalue_or_else): Remove.

PR c++/18556
* toplev.c (check_global_declarations): Set DECL_IGNORED_P on
unemitted variables with static storage duration.

PR c++/18445
* class.c (instantiate_type): Treat NON_DEPENDENT_EXPRs with
unknown_type as non matching.  Tidy up.
* pt.c (build_non_dependent_expr): Do not build a
NON_DEPENDENT_EXPR for a VAR_DECL.

PR c++/18001
* cp-tree.h (lvalue_or_else): Remove declaration.
* tree.c (lvalue_or_else): Remove.
* typeck.c (build_unary_op): Adjust call to lvalue_or_else.
(build_modify_expr): Likewise.

PR c++/18625
* decl.c (duplicate_decls): Return error_mark_node on error, as
specified.

PR c++/18466
* decl.c (grokvardecl): Keep track of whether or not a there was
explicit qualification.
* name-lookup.c (set_decl_namespace): Complain about explicit
qualification of a name within its own namespace.

PR c++/18545
* typeck.c (check_return_expr): Robustify.

PR c++/18445
* g++.dg/template/crash28.C: Likewise.

PR c++/18001
* g++.dg/expr/unary2.C: Adjust lvalue messages.
* g++.dg/ext/lvaddr.C: Likewise.
* g++.dg/opt/pr7503-3.C: Likewise.

PR c++/18466
* g++.dg/parse/qualified3.C: New test.
* g++.old-deja/g++.other/friend7.C: Remove bogus qualification.

PR c++/18545
* g++.dg/expr/return1.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6549&r2=2.6550
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.c.diff?cvsroot=gcc&r1=1.587&r2=1.588
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-common.h.diff?cvsroot=gcc&r1=1.271&r2=1.272
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&r1=1.400&r2=1.401
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/toplev.c.diff?cvsroot=gcc&r1=1.932&r2=1.933
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4648&r2=1.4649
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/crash28.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/expr/return1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/expr/unary2.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/lvaddr.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/opt/pr7503-3.C.diff?cvsroot=gcc&r1=1.1&r2=1.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/qualified3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.old-deja/g++.other/friend7.C.diff?cvsroot=gcc&r1=1.2&r2=1.3
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4498&r2=1.4499
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&r1=1.689&r2=1.690
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.1073&r2=1.1074
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1333&r2=1.1334
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/name-lookup.c.diff?cvsroot=gcc&r1=1.95&r2=1.96
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.948&r2=1.949
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/tree.c.diff?cvsroot=gcc&r1=1.419&r2=1.420
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/typeck.c.diff?cvsroot=gcc&r1=1.598&r2=1.599



-- 


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


[Bug c++/18556] [4.0 Regression] C++ debug is broken

2004-11-25 Thread mmitchel at gcc dot gnu dot org

--- Additional Comments From mmitchel at gcc dot gnu dot org  2004-11-25 
17:41 ---
Fixed in 4.0.

-- 
   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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


[Bug c++/18556] [4.0 Regression] C++ debug is broken

2004-11-24 Thread mmitchel at gcc dot gnu dot org


-- 
   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
   |dot org |
 Status|NEW |ASSIGNED


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


[Bug c++/18556] [4.0 Regression] C++ debug is broken

2004-11-19 Thread hjl at lucon dot org

--- Additional Comments From hjl at lucon dot org  2004-11-19 23:39 ---
The symptom is that debug information references the symbol which is omittted.

-- 


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


[Bug c++/18556] [4.0 Regression] C++ debug is broken

2004-11-19 Thread mark at codesourcery dot com

--- Additional Comments From mark at codesourcery dot com  2004-11-19 22:54 
---
Subject: Re:  [4.0 Regression] C++ debug is broken

hjl at lucon dot org wrote:
> --- Additional Comments From hjl at lucon dot org  2004-11-19 22:50 
> ---
> Does this patch
> 
> --- toplev.c.bar2004-11-16 10:13:18.0 -0800
> +++ toplev.c2004-11-19 14:50:09.493493596 -0800
> @@ -818,6 +818,13 @@ check_global_declarations (tree *vec, in
>for (i = 0; i < len; i++)
>  {
>decl = vec[i];
> +
> +  if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl)
> + && ! TREE_ASM_WRITTEN (decl))
> +   /* Cancel the RTL for this decl so that, if debugging info
> +  output for global variables is still to come, this one
> +  will be omitted.  */
> +   DECL_IGNORED_P (decl) = 1;
> 
>/* Warn about any function
>  declared static but not defined.
> 
> make any senses? It makes the failed testcase to pass.

It makes much more sense that what was there before, although clearly 
the comment is wrong.  I've not yet worked out whether this is the right 
approach or not, though.



-- 


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


[Bug c++/18556] [4.0 Regression] C++ debug is broken

2004-11-19 Thread hjl at lucon dot org

--- Additional Comments From hjl at lucon dot org  2004-11-19 22:50 ---
Does this patch

--- toplev.c.bar2004-11-16 10:13:18.0 -0800
+++ toplev.c2004-11-19 14:50:09.493493596 -0800
@@ -818,6 +818,13 @@ check_global_declarations (tree *vec, in
   for (i = 0; i < len; i++)
 {
   decl = vec[i];
+
+  if (TREE_CODE (decl) == VAR_DECL && TREE_STATIC (decl)
+ && ! TREE_ASM_WRITTEN (decl))
+   /* Cancel the RTL for this decl so that, if debugging info
+  output for global variables is still to come, this one
+  will be omitted.  */
+   DECL_IGNORED_P (decl) = 1;

   /* Warn about any function
 declared static but not defined.

make any senses? It makes the failed testcase to pass.

-- 


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


[Bug c++/18556] [4.0 Regression] C++ debug is broken

2004-11-18 Thread hjl at lucon dot org

--- Additional Comments From hjl at lucon dot org  2004-11-19 01:42 ---
I have verified that

http://gcc.gnu.org/ml/gcc-patches/2004-11/msg00970.html

is the cause.

-- 


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


[Bug c++/18556] [4.0 Regression] C++ debug is broken

2004-11-18 Thread hjl at lucon dot org

--- Additional Comments From hjl at lucon dot org  2004-11-19 00:34 ---
Please check out g++.old-deja/g++.mike/eh53.C. I got

[EMAIL PROTECTED] testsuite]$ /usr/gcc-4.0/bin/g++  
/net/gnu/export/gnu/src/gcc/gcc/gcc/testsuite/g++.old-deja/g++.mike/eh53.C -g -c
[EMAIL PROTECTED] testsuite]$ readelf -s eh53.o | grep zeroset 21: 

   16 OBJECT  WEAK   DEFAULT   10 _ZTI7zeroset
23:  9 OBJECT  WEAK   DEFAULT   12 _ZTS7zeroset
24: 32 FUNCWEAK   DEFAULT   13 _ZN7zerosetD1Ev
[EMAIL PROTECTED] testsuite]$ ../g++ -B../ 
/net/gnu/export/gnu/src/gcc/gcc/gcc/testsuite/g++.old-deja/g++.mike/eh53.C -g -c
[EMAIL PROTECTED] testsuite]$ readelf -s eh53.o | grep zeroset 17: 

   32 FUNCWEAK   DEFAULT   10 _ZN7zerosetD1Ev
19:  0 NOTYPE  GLOBAL DEFAULT  UND _ZTI7zeroset
[EMAIL PROTECTED] testsuite]$ ../g++ -B../ 
/net/gnu/export/gnu/src/gcc/gcc/gcc/testsuite/g++.old-deja/g++.mike/eh53.C -g
/tmp/cc0mrglD.o(.debug_info+0x197): undefined reference to `typeinfo for 
zeroset'
collect2: ld returned 1 exit status


-- 


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


[Bug c++/18556] [4.0 Regression] C++ debug is broken

2004-11-18 Thread mmitchel at gcc dot gnu dot org

--- Additional Comments From mmitchel at gcc dot gnu dot org  2004-11-18 
22:44 ---
I will need a preprocessed test case and command-line.


-- 


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


[Bug c++/18556] [4.0 Regression] C++ debug is broken

2004-11-18 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-18 
22:41 ---
The only change between the 11 and the 13 which makes sense at even having an 
effect:
2004-11-12  Mark Mitchell  <[EMAIL PROTECTED]>

PR c++/18416
* passes.c (rest_of_decl_compilation): Do not look at DECL_RTL
when deciding whether to pass a variable to
cgraph_varpool_finalize_decl or assemble_variable.
* toplev.c (check_global_declarations): Do not clear DECL_RTL.

-- 
   What|Removed |Added

 CC||mark at codesourcery dot com


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


[Bug c++/18556] [4.0 Regression] C++ debug is broken

2004-11-18 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-18 
22:36 ---
http://gcc.gnu.org/ml/gcc-testresults/2004-11/msg00581.html is also broken.

-- 
   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed||1
   Keywords||wrong-code
   Last reconfirmed|-00-00 00:00:00 |2004-11-18 22:36:11
   date||
Summary|C++ debug is broken |[4.0 Regression] C++ debug
   ||is broken
   Target Milestone|--- |4.0.0


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