* c-common.c (handle_mode_attribute): Disallow mode changes that
alter the CODE of the top-level type.
* crtstuff.c (__FRAME_END__): Remove mode attribute. Find 32-bit
integer from internal limits macros.
* config/i386/mm3dnow.h (__v2sf): Fix base type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89009
138bc75d-0d04-0410-961f-
82ee72b054a4
2004-10-13 Richard Henderson <rth@redhat.com>
+
+ PR c/17384
+ * c-common.c (handle_mode_attribute): Disallow mode changes that
+ alter the CODE of the top-level type.
+
+ * crtstuff.c (__FRAME_END__): Remove mode attribute. Find 32-bit
+ integer from internal limits macros.
+ * config/i386/mm3dnow.h (__v2sf): Fix base type.
+
+2004-10-13 Richard Henderson <rth@redhat.com>
PR debug/13841
* function.c (instantiate_decl): Recurse for CONCAT.
else
for (j = 0; j < NUM_MACHINE_MODES; j++)
if (!strcmp (p, GET_MODE_NAME (j)))
- mode = (enum machine_mode) j;
+ {
+ mode = (enum machine_mode) j;
+ break;
+ }
if (mode == VOIDmode)
{
if (typefm == NULL_TREE)
{
- error ("no data type for mode %<%s%>", p);
+ error ("no data type for mode %qs", p);
return NULL_TREE;
}
else if (TREE_CODE (type) == ENUMERAL_TYPE)
this mode for this type. */
if (TREE_CODE (typefm) != INTEGER_TYPE)
{
- error ("cannot use mode %qs for enumeral types",
- GET_MODE_NAME (mode));
+ error ("cannot use mode %qs for enumeral types", p);
return NULL_TREE;
}
TYPE_PRECISION (type) = TYPE_PRECISION (typefm);
typefm = type;
}
+ else if (TREE_CODE (type) != TREE_CODE (typefm))
+ {
+ error ("mode %qs applied to inappropriate type", p);
+ return NULL_TREE;
+ }
+
*node = typefm;
/* No need to layout the type here. The caller should do this. */
#include <mmintrin.h>
/* Internal data types for implementing the intrinsics. */
-typedef int __v2sf __attribute__ ((__mode__ (__SF__), __vector_size__ (8)));
+typedef float __v2sf __attribute__ ((__vector_size__ (8)));
static __inline void
_m_femms (void)
#ifdef EH_FRAME_SECTION_NAME
/* Terminate the frame unwind info section with a 4byte 0 as a sentinel;
this would be the 'length' field in a real FDE. */
-STATIC EH_FRAME_SECTION_CONST int __FRAME_END__[]
- __attribute__ ((unused, mode(SI), section(EH_FRAME_SECTION_NAME),
- aligned(4)))
+# if __INT_MAX__ == 2147483647
+typedef int int32;
+# elif __LONG_MAX__ == 2147483647
+typedef long int32;
+# elif __SHRT_MAX__ == 2147483647
+typedef short int32;
+# else
+# error "Missing a 4 byte integer"
+# endif
+STATIC EH_FRAME_SECTION_CONST int32 __FRAME_END__[]
+ __attribute__ ((unused, section(EH_FRAME_SECTION_NAME),
+ aligned(sizeof(int32))))
= { 0 };
#endif /* EH_FRAME_SECTION_NAME */
--- /dev/null
+/* PR c/17384 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+typedef struct __attribute__((mode(SI))) {
+ unsigned INT0 :1,
+ RES0 :1,
+ :6,
+ INT1 :1,
+ RES1 :1,
+ :6,
+ :16;
+} MCR; /* { dg-error "inappropriate type" } */