johannes 02/11/11 14:16:09
Modified: live/gcc3/gcc Tag: fearless-kitty-branch tree.c c-common.c
dbxout.c
Log:
move debug info fixes in fearless-kitty:
2947813 2985457 2997607 3047765 3067314
Revision Changes Path
No revision
No revision
1.39.4.3 +9 -4 src/live/gcc3/gcc/tree.c
Index: tree.c
===================================================================
RCS file: /cvs/Darwin/src/live/gcc3/gcc/tree.c,v
retrieving revision 1.39.4.2
retrieving revision 1.39.4.3
diff -u -r1.39.4.2 -r1.39.4.3
--- tree.c 2002/09/30 21:39:35 1.39.4.2
+++ tree.c 2002/11/11 22:15:55 1.39.4.3
@@ -4813,8 +4813,13 @@
{
tree index = build_int_2 (TYPE_VECTOR_SUBPARTS (t) - 1, 0);
- tree array = build_array_type (TREE_TYPE (t),
- build_index_type (index));
+ /* APPLE LOCAL AltiVec */
+ /* Use unsigned_char_type rather than int_QI_type, etc.
+ so debug info is common with nonvector unsigned char */
+ tree array = build_array_type (
+ (*lang_hooks.types.type_for_mode) (TYPE_MODE (TREE_TYPE (t)),
+ TREE_UNSIGNED (TREE_TYPE (t))),
+ build_index_type (index));
tree rt = make_node (RECORD_TYPE);
TYPE_FIELDS (rt) = build_decl (FIELD_DECL, get_identifier ("f"), array);
@@ -4970,7 +4975,7 @@
/* APPLE LOCAL begin AltiVec */
unsigned_VPIXEL_type_node
- = make_vector (V4HImode, unsigned_intHI_type_node, 1);
+ = make_vector (V8HImode, unsigned_intHI_type_node, 1);
/* The 'vector bool...' and 'vector unsigned...' types are the
same as far as the back-end is concerned, but are distinct
for purposes of C/C++ type resolution. */
@@ -5001,7 +5006,7 @@
set to V4SImode, irrespective of input param mode. */
static tree
make_vector (mode, innertype, unsignedp)
- enum machine_mode mode ATTRIBUTE_UNUSED;
+ enum machine_mode mode;
tree innertype;
int unsignedp;
{
1.64.2.2 +8 -0 src/live/gcc3/gcc/c-common.c
Index: c-common.c
===================================================================
RCS file: /cvs/Darwin/src/live/gcc3/gcc/c-common.c,v
retrieving revision 1.64.2.1
retrieving revision 1.64.2.2
diff -u -r1.64.2.1 -r1.64.2.2
--- c-common.c 2002/10/09 02:02:16 1.64.2.1
+++ c-common.c 2002/11/11 22:15:58 1.64.2.2
@@ -662,6 +662,13 @@
if (!decl)
{
tree saved_last_tree = last_tree;
+ /* If a tree is built here, it would normally have the lineno of
+ the current statement. Later this tree will be moved to the
+ beginning of the function and this line number will be wrong.
+ To avoid this problem set the lineno to 0 here; that prevents
+ it from appearing in the RTL. */
+ int saved_lineno = lineno;
+ lineno = 0;
decl = (*make_fname_decl) (id, fname_vars[ix].pretty);
if (last_tree != saved_last_tree)
@@ -677,6 +684,7 @@
saved_function_name_decls);
}
*fname_vars[ix].decl = decl;
+ lineno = saved_lineno;
}
if (!ix && !current_function_decl)
pedwarn_with_decl (decl, "`%s' is not defined outside of function scope");
1.23.2.3 +4 -2 src/live/gcc3/gcc/dbxout.c
Index: dbxout.c
===================================================================
RCS file: /cvs/Darwin/src/live/gcc3/gcc/dbxout.c,v
retrieving revision 1.23.2.2
retrieving revision 1.23.2.3
diff -u -r1.23.2.2 -r1.23.2.3
--- dbxout.c 2002/10/17 19:57:11 1.23.2.2
+++ dbxout.c 2002/11/11 22:16:01 1.23.2.3
@@ -1374,7 +1374,9 @@
static int anonymous_type_number = 0;
if (TREE_CODE (type) == VECTOR_TYPE)
- type = TYPE_DEBUG_REPRESENTATION_TYPE (type);
+ /* The frontend feeds us a representation for the vector as a struct
+ containing an array. Pull out the array type. */
+ type = TREE_TYPE (TYPE_FIELDS (TYPE_DEBUG_REPRESENTATION_TYPE (type)));
/* If there was an input error and we don't really have a type,
avoid crashing and write something that is at least valid
@@ -2222,7 +2224,7 @@
{
tree t;
- if (!TREE_USED (decl))
+ if (!TREE_USED (decl) && !DECL_INITIAL (decl))
DBXOUT_DECR_NESTING_AND_RETURN (0);
/* We now have a used symbol. We need to generate the info for