]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
dbxout.c (dbxout_type): Emit attribute vector.
authorDevang Patel <dpatel@apple.com>
Mon, 25 Apr 2005 20:26:00 +0000 (13:26 -0700)
committerDevang Patel <dpatel@gcc.gnu.org>
Mon, 25 Apr 2005 20:26:00 +0000 (13:26 -0700)
        * dbxout.c (dbxout_type): Emit attribute vector.
        * gcc.dg/stabs-attrib-vect-darwin.c: New test.

From-SVN: r98737

gcc/ChangeLog
gcc/dbxout.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/stabs-attrib-vect-darwin.c [new file with mode: 0644]

index fea482b414c3cfbb455cefedbe538842a294f113..2824494573dd3e2b5c22355e3ac0bdf79ea20bd5 100644 (file)
@@ -1,3 +1,7 @@
+2005-04-25  Devang Patel <dpatel@apple.com>
+
+       * dbxout.c (dbxout_type): Emit attribute vector.
+       
 2005-04-05  Paul Brook  <julian@codesourcery.com>
 
        * target-def.h (TARGET_CXX_USE_AEABI_ATEXIT): Define.
index 4cbe16b603faf7c43dae548224c1e3dbe7b1a2d6..6ad3b629d104b4d09e0fa026696a0b85a6417ab7 100644 (file)
@@ -1652,11 +1652,15 @@ dbxout_type (tree type, int full)
   tree tem;
   tree main_variant;
   static int anonymous_type_number = 0;
+  bool vector_type = false;
 
   if (TREE_CODE (type) == VECTOR_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)));
+    {
+      /* 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)));
+      vector_type = true;
+    }
 
   /* If there was an input error and we don't really have a type,
      avoid crashing and write something that is at least valid
@@ -1991,6 +1995,12 @@ dbxout_type (tree type, int full)
          break;
        }
 
+      if (vector_type)
+       {
+         have_used_extensions = 1;
+         stabstr_S ("@V;");
+       }
+
       /* Output "a" followed by a range type definition
         for the index type of the array
         followed by a reference to the target-type.
index 168fcdf50ca3ee749463261ddf7098b2ebdbf68c..ddd7310e96abf5cead5af96af4bf110c4f4688f5 100644 (file)
@@ -1,3 +1,7 @@
+2005-04-25  Devang Patel <dpatel@apple.com>
+
+       * gcc.dg/stabs-attrib-vect-darwin.c: New test.
+       
 2005-04-25  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR testsuite/21062
diff --git a/gcc/testsuite/gcc.dg/stabs-attrib-vect-darwin.c b/gcc/testsuite/gcc.dg/stabs-attrib-vect-darwin.c
new file mode 100644 (file)
index 0000000..d380f8e
--- /dev/null
@@ -0,0 +1,11 @@
+/* Test Attribute Vector associated with vector type stabs.  */
+/* { dg-do compile { target powerpc*-*-darwin* } } */
+/* { dg-options "-gstabs -fno-eliminate-unused-debug-types -faltivec" } */
+
+int main ()
+{
+  vector int vi = { 6,7,8,9 };
+  return 0;
+}
+
+/* { dg-final { scan-assembler ".stabs.*vi\:\\(0,16\\)=\@V" } } */