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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [Woverlength-strings-pedantic-c90-asm.c] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* -Woverlength-strings complains about string constants which are too long
2
   for the C standard's "minimum maximum" limits.  It is off by default,
3
   but implied by -pedantic.  */
4
 
5
/* { dg-options "-std=c90 -pedantic" } */
6
 
7
#define TEN "          "
8
#define HUN TEN TEN TEN TEN TEN  TEN TEN TEN TEN TEN
9
#define THO HUN HUN HUN HUN HUN  HUN HUN HUN HUN HUN
10
 
11
/* C89's minimum-maximum is 509. */
12
__asm__ (HUN HUN HUN HUN HUN TEN);
13
 
14
/* C99's minimum-maximum is 4095.  */
15
__asm__ (
16
  THO THO THO THO     /* 4000 */
17
  TEN TEN TEN TEN TEN /* 4050 */
18
  TEN TEN TEN TEN     /* 4090 */
19
  "123456");
20
 
21
void
22
f (void)
23
{
24
  /* C89's minimum-maximum is 509. */
25
  __asm__ (HUN HUN HUN HUN HUN TEN);
26
  __asm__ (HUN HUN HUN HUN HUN TEN : :);
27
  __asm__ goto (HUN HUN HUN HUN HUN TEN : : : : label);
28
 
29
  /* C99's minimum-maximum is 4095.  */
30
  __asm__ (
31
           THO THO THO THO     /* 4000 */
32
           TEN TEN TEN TEN TEN /* 4050 */
33
           TEN TEN TEN TEN     /* 4090 */
34
           "123456");
35
  __asm__ (
36
           THO THO THO THO     /* 4000 */
37
           TEN TEN TEN TEN TEN /* 4050 */
38
           TEN TEN TEN TEN     /* 4090 */
39
           "123456" : :);
40
  __asm__ goto (
41
                THO THO THO THO     /* 4000 */
42
                TEN TEN TEN TEN TEN /* 4050 */
43
                TEN TEN TEN TEN     /* 4090 */
44
                "123456" : : : : label);
45
 
46
 label: ;
47
}
48
 

powered by: WebSVN 2.1.0

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