[Bug c++/20505] [4.0/4.1 Regression] internal error when compiling with -ggdb2 and no error with -ggdb1

2005-03-31 Thread cvs-commit at gcc dot gnu dot org

--- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-04-01 
03:58 ---
Subject: Bug 20505

CVSROOT:/cvs/gcc
Module name:gcc
Changes by: [EMAIL PROTECTED]   2005-04-01 03:58:44

Modified files:
gcc: ChangeLog dwarf2out.c 

Log message:
Handle static const initializers that contain arithmetic.
PR c++/20505
* dwarf2out.c (rtl_for_decl_init): New function.
(rtl_for_decl_location): Extracted from here.
(tree_add_const_value_attribute): Call rtl_for_decl_init and
add_const_value_attribute.  Delete initializer_constant_valid_p call.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gccr1=2.8063r2=2.8064
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/dwarf2out.c.diff?cvsroot=gccr1=1.578r2=1.579



-- 


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


[Bug c++/20505] [4.0/4.1 Regression] internal error when compiling with -ggdb2 and no error with -ggdb1

2005-03-31 Thread wilson at gcc dot gnu dot org

--- Additional Comments From wilson at gcc dot gnu dot org  2005-04-01 
04:04 ---
Fixed on mainline.  Still needs to be fixed on the gcc-4.0 branch, which I
assume Nathan is doing.

I had to back off a bit from my earlier plans.  Aggregate types and constructor
initializers pose complications that don't appear to be worth fixing, so I only
handle integral types, scalar real types, and STRING_CST.  I commonized the code
in rtl_for_decl_location and tree_add_const_value_attribute so that they both
work the same.

The testcase by the way isn't portable.  It requires that int and pointer be the
same size.  I had to do s/int/long to make it work on my ia64 and x86_64
systems.  But still that assumes long and pointers are the same size which is
not true for all ABIs supported by all targets.  This is why I didn't already
add the testcase to the testsuite on mainline.

-- 


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


[Bug c++/20505] [4.0/4.1 Regression] internal error when compiling with -ggdb2 and no error with -ggdb1

2005-03-29 Thread wilson at gcc dot gnu dot org

--- Additional Comments From wilson at gcc dot gnu dot org  2005-03-30 
02:16 ---
See
http://gcc.gnu.org/ml/gcc/2005-03/msg01274.html
for comments.

-- 


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


[Bug c++/20505] [4.0/4.1 Regression] internal error when compiling with -ggdb2 and no error with -ggdb1

2005-03-24 Thread mmitchel at gcc dot gnu dot org

--- Additional Comments From mmitchel at gcc dot gnu dot org  2005-03-24 
17:48 ---
This is a missed-optimization bug as well, in that the initialization expression
should be simplified to a constant.

-- 
   What|Removed |Added

   Keywords||missed-optimization


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


[Bug c++/20505] [4.0/4.1 Regression] internal error when compiling with -ggdb2 and no error with -ggdb1

2005-03-24 Thread nathan at gcc dot gnu dot org

--- Additional Comments From nathan at gcc dot gnu dot org  2005-03-24 
18:58 ---
actually, it'd be a miscompile if it had a dynamic initializer (because
the std says such a thing *must* be static initialized).  Fortunately
the assembly is correct (which is kind of bizarre)

.type   _ZN1b1dE, @object
.size   _ZN1b1dE, 4
_ZN1b1dE:
.long   8


-- 


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


[Bug c++/20505] [4.0/4.1 Regression] internal error when compiling with -ggdb2 and no error with -ggdb1

2005-03-17 Thread nathan at gcc dot gnu dot org


-- 
   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |nathan at gcc dot gnu dot
   |dot org |org
 Status|NEW |ASSIGNED
   Last reconfirmed|2005-03-16 23:25:28 |2005-03-17 17:35:07
   date||


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


[Bug c++/20505] [4.0/4.1 Regression] internal error when compiling with -ggdb2 and no error with -ggdb1

2005-03-16 Thread pinskia at gcc dot gnu dot org

--- Additional Comments From pinskia at gcc dot gnu dot org  2005-03-16 
23:48 ---
Hmm, I think this was caused by:
2004-08-30  Richard Henderson  [EMAIL PROTECTED]

* class.c (build_base_path): Use build_address directly.
* typeck.c (build_unary_op): Don't lower a.b to pointer
arithmetic directly.
* typeck2.c (store_init_value): Don't assume !TREE_CONSTANT 
means !initializer_constant_valid_p.


-- 
   What|Removed |Added

 CC||rth at gcc dot gnu dot org
  Component|debug   |c++


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