Add _FloatN, _FloatNx tests for __builtin_fpclassify.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr47411.c
blobd3c10d331e756c60b556dee13ffc4027dc3ee7c8
1 /* { dg-do compile } */
3 typedef long unsigned int size_t;
5 static __inline void *
6 __inline_memcpy_chk (void *__dest, const void *__src, size_t __len)
8 return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
11 extern void *xmalloc (size_t) __attribute__ ((__malloc__));
13 struct htab { void ** entries; };
15 typedef struct htab *htab_t;
17 extern void ** htab_find_slot (htab_t, const void *);
19 enum mode_class { MODE_RANDOM, MODE_CC, MODE_INT, MAX_MODE_CLASS };
21 struct mode_data
23 struct mode_data *next;
24 enum mode_class cl;
27 static const struct mode_data blank_mode = { 0, MAX_MODE_CLASS };
29 static htab_t modes_by_name;
31 struct mode_data *
32 new_mode (void)
34 struct mode_data *m
35 = ((struct mode_data *) xmalloc (sizeof (struct mode_data)));
37 ((__builtin_object_size (m, 0) != (size_t) -1) ? __builtin___memcpy_chk (m, &blank_mode, sizeof (struct mode_data), __builtin_object_size (m, 0)) : __inline_memcpy_chk (m, &blank_mode, sizeof (struct mode_data)));
39 *htab_find_slot (modes_by_name, m) = m;
41 return m;