OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [dfp/] [usual-arith-conv-const.c] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
/* { dg-do compile } */
/* { dg-do compile } */
/* { dg-options "-std=gnu99" } */
/* { dg-options "-std=gnu99" } */
 
 
/* Test various conversions involving decimal floating types. */
/* Test various conversions involving decimal floating types. */
 
 
/* Assertion that constant C is of type T.  */
/* Assertion that constant C is of type T.  */
#define ASSERT_CONST_TYPE(C, T)                 \
#define ASSERT_CONST_TYPE(C, T)                 \
        do {                                    \
        do {                                    \
          typedef T type;                       \
          typedef T type;                       \
          typedef type **typepp;                \
          typedef type **typepp;                \
          typedef __typeof__((C)) ctype;        \
          typedef __typeof__((C)) ctype;        \
          typedef ctype **ctypepp;              \
          typedef ctype **ctypepp;              \
          typepp x = 0;                         \
          typepp x = 0;                         \
          ctypepp y = 0;                        \
          ctypepp y = 0;                        \
          x = y;                                \
          x = y;                                \
          y = x;                                \
          y = x;                                \
        } while (0)
        } while (0)
 
 
int
int
main ()
main ()
{
{
  ASSERT_CONST_TYPE (3 + 2.1df, _Decimal32); /* { dg-bogus "assignment from incompatible pointer type" } */
  ASSERT_CONST_TYPE (3 + 2.1df, _Decimal32); /* { dg-bogus "assignment from incompatible pointer type" } */
  ASSERT_CONST_TYPE (1.3df + 2, _Decimal32); /* { dg-bogus "assignment from incompatible pointer type" } */
  ASSERT_CONST_TYPE (1.3df + 2, _Decimal32); /* { dg-bogus "assignment from incompatible pointer type" } */
  ASSERT_CONST_TYPE (56U - 55.0dd, _Decimal64); /* { dg-bogus "assignment from incompatible pointer type" } */
  ASSERT_CONST_TYPE (56U - 55.0dd, _Decimal64); /* { dg-bogus "assignment from incompatible pointer type" } */
  ASSERT_CONST_TYPE (5 * .2DL, _Decimal128); /* { dg-bogus "assignment from incompatible pointer type" } */
  ASSERT_CONST_TYPE (5 * .2DL, _Decimal128); /* { dg-bogus "assignment from incompatible pointer type" } */
  ASSERT_CONST_TYPE (.88dl / 2L, _Decimal128); /* { dg-bogus "assignment from incompatible pointer type" } */
  ASSERT_CONST_TYPE (.88dl / 2L, _Decimal128); /* { dg-bogus "assignment from incompatible pointer type" } */
  ASSERT_CONST_TYPE (.114df - 1.6dd, _Decimal64); /* { dg-bogus "assignment from incompatible pointer type" } */
  ASSERT_CONST_TYPE (.114df - 1.6dd, _Decimal64); /* { dg-bogus "assignment from incompatible pointer type" } */
  ASSERT_CONST_TYPE (3L - 1 + .55df, _Decimal32); /* { dg-bogus "assignment from incompatible pointer type" } */
  ASSERT_CONST_TYPE (3L - 1 + .55df, _Decimal32); /* { dg-bogus "assignment from incompatible pointer type" } */
 
 
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.