aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-09-09 00:27:40 +0000
committerRichard Stallman <rms@gnu.org>1992-09-09 00:27:40 +0000
commit15a5b8a22ae6091ce9a3ff5431580d39cdc180d6 (patch)
tree5c2db9980767d46dce6baab84201f823b2452d89
parent1b6374aa53737ea2a1087b04fde561576e221768 (diff)
downloadgcc-15a5b8a22ae6091ce9a3ff5431580d39cdc180d6.zip
gcc-15a5b8a22ae6091ce9a3ff5431580d39cdc180d6.tar.gz
gcc-15a5b8a22ae6091ce9a3ff5431580d39cdc180d6.tar.bz2
(dbxout_type_fields): Handle nameless subrecords for Pascal.
(dbxout_type): Handle CHAR_TYPE, BOOLEAN_TYPE. FILE_TYPE, SET_TYPE. From-SVN: r2079
-rw-r--r--gcc/dbxout.c46
1 files changed, 43 insertions, 3 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c
index 292e4a2..ba1a550 100644
--- a/gcc/dbxout.c
+++ b/gcc/dbxout.c
@@ -561,12 +561,14 @@ dbxout_type_fields (type)
tree type;
{
tree tem;
+ /* Output the name, type, position (in bits), size (in bits) of each
+ field. */
for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem))
{
- /* Output the name, type, position (in bits), size (in bits)
- of each field. */
+ /* For nameless subunions and subrecords, treat their fields as ours. */
if (DECL_NAME (tem) == NULL_TREE
- && TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE)
+ && (TREE_CODE (TREE_TYPE (tem)) == UNION_TYPE
+ || TREE_CODE (TREE_TYPE (tem)) == RECORD_TYPE))
dbxout_type_fields (TREE_TYPE (tem));
/* Omit here local type decls until we know how to support them. */
else if (TREE_CODE (tem) == TYPE_DECL)
@@ -989,6 +991,44 @@ dbxout_type (type, full, show_arg_types)
CHARS (16);
break;
+ case CHAR_TYPE:
+ /* Output the type `char' as a subrange of itself.
+ That is what pcc seems to do. */
+ fprintf (asmfile, "r%d;0;%d;", TYPE_SYMTAB_ADDRESS (char_type_node),
+ TREE_UNSIGNED (type) ? 255 : 127);
+ CHARS (9);
+ break;
+
+ case BOOLEAN_TYPE: /* Define as enumeral type (False, True) */
+ fprintf (asmfile, "eFalse:0,True:1,;");
+ CHARS (17);
+ break;
+
+ case FILE_TYPE:
+ putc ('d', asmfile);
+ CHARS (1);
+ dbxout_type (TREE_TYPE (type), 0);
+ break;
+
+ case COMPLEX_TYPE:
+ /* Differs from the REAL_TYPE by its new data type number */
+
+ if (TREE_CODE (TREE_TYPE (type)) == REAL_TYPE)
+ {
+ fprintf (asmfile, "r%d;%d;0;",
+ TYPE_SYMTAB_ADDRESS (type),
+ TREE_INT_CST_LOW (size_in_bytes (TREE_TYPE (type))));
+ CHARS (15); /* The number is propably incorrect here */
+ } else
+ abort (); /* What to do with CSImode complex? */
+ break;
+
+ case SET_TYPE:
+ putc ('S', asmfile);
+ CHARS (1);
+ dbxout_type (TREE_TYPE (type), 0);
+ break;
+
case ARRAY_TYPE:
/* Output "a" followed by a range type definition
for the index type of the array