diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-02-03 18:26:28 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-02-03 18:26:28 +0100 |
commit | 754ccf7c7c9db6326708936242365c2df354ffae (patch) | |
tree | b0a7814cdb76726cd1bc60f57e9f3dcfc99dd568 /gcc/testsuite/gcc.dg | |
parent | a36c33ebfc595336528780a71a2897d2b8dbdb94 (diff) | |
download | gcc-754ccf7c7c9db6326708936242365c2df354ffae.zip gcc-754ccf7c7c9db6326708936242365c2df354ffae.tar.gz gcc-754ccf7c7c9db6326708936242365c2df354ffae.tar.bz2 |
re PR inline-asm/39059 (ICE with fixed-point type in inline-asm)
PR inline-asm/39059
* c-parser.c (c_parser_postfix_expression): If fixed point is not
supported, don't accept FIXED_CSTs.
* c-decl.c (finish_declspecs): Error if fixed point is not supported
and _Sat is used without _Fract/_Accum. Set specs->type to
integer_type_node for cts_fract/cts_accum if fixed point is not
supported.
* parser.c (cp_parser_primary_expression): Reject FIXED_CSTs.
* gcc.dg/nofixed-point-2.c: New test.
* g++.dg/ext/fixed1.C: Adjust expected diagnostics.
* g++.dg/ext/fixed2.C: Likewise.
* g++.dg/other/error25.C: Likewise.
* g++.dg/lookup/crash7.C: Likewise.
* g++.dg/cpp0x/decltype-38655.C: Likewise.
From-SVN: r143900
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/nofixed-point-2.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/nofixed-point-2.c b/gcc/testsuite/gcc.dg/nofixed-point-2.c new file mode 100644 index 0000000..97bbf70 --- /dev/null +++ b/gcc/testsuite/gcc.dg/nofixed-point-2.c @@ -0,0 +1,30 @@ +/* PR inline-asm/39059 */ +/* { dg-do compile { target {! fixed_point} } } */ +/* { dg-options "-std=gnu99" } */ + +void +f1 (void) +{ + asm ("" : : "r" (0r)); /* { dg-error "not supported" "reject fixed-point" } */ +} + +__typeof (0r) /* { dg-error "not supported" "reject fixed-point" } */ +b2 (void) +{ + return 0r; /* { dg-error "not supported" "reject fixed-point" } */ +} + +_Accum /* { dg-error "not supported" "reject fixed-point" } */ +f3 (void) +{ + return 0k; /* { dg-error "not supported" "reject fixed-point" } */ +} + +_Sat +f4 (void) /* { dg-error "not supported" "reject fixed-point" } */ +{ + return 0k; /* { dg-error "not supported" "reject fixed-point" } */ +} + +/* { dg-warning "defaults to" "" { target *-*-* } 13 } */ +/* { dg-error "is used without" "" { target *-*-* } 24 } */ |