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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [spu/] [ea/] [errors1.c] - Blame information for rev 695

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

Line No. Rev Author Line
1 691 jeremybenn
/* Copyright (C) 2009 Free Software Foundation, Inc.
2
 
3
   This file is free software; you can redistribute it and/or modify it under
4
   the terms of the GNU General Public License as published by the Free
5
   Software Foundation; either version 3 of the License, or (at your option)
6
   any later version.
7
 
8
   This file is distributed in the hope that it will be useful, but WITHOUT
9
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
11
   for more details.
12
 
13
   You should have received a copy of the GNU General Public License
14
   along with this file; see the file COPYING3.  If not see
15
   <http://www.gnu.org/licenses/>.  */
16
 
17
/* Invalid __ea declarations.  */
18
 
19
/* { dg-do compile } */
20
 
21
typedef __ea int eaint;
22
 
23
void func ()
24
{
25
  register __ea int local1; /* { dg-error "'__ea' combined with 'register' qualifier for 'local1'" } */
26
  auto __ea int local2;     /* { dg-error "'__ea' combined with 'auto' qualifier for 'local2'" } */
27
  __ea int local3;          /* { dg-error "'__ea' specified for auto variable 'local3'" } */
28
  register int *__ea p1;    /* { dg-error "'__ea' combined with 'register' qualifier for 'p1'" } */
29
  auto char *__ea p2;       /* { dg-error "'__ea' combined with 'auto' qualifier for 'p2'" } */
30
  void *__ea p3;            /* { dg-error "'__ea' specified for auto variable 'p3'" } */
31
  register __ea int a1[2];  /* { dg-error "'__ea' combined with 'register' qualifier for 'a1'" } */
32
  auto __ea char a2[1];     /* { dg-error "'__ea' combined with 'auto' qualifier for 'a2'" } */
33
  __ea char a3[5];          /* { dg-error "'__ea' specified for auto variable 'a3'" } */
34
  register eaint td1;       /* { dg-error "'__ea' combined with 'register' qualifier for 'td1'" } */
35
  auto eaint td2;           /* { dg-error "'__ea' combined with 'auto' qualifier for 'td2'" } */
36
  eaint td3;                /* { dg-error "'__ea' specified for auto variable 'td3'" } */
37
}
38
 
39
void func2 (__ea int x)     /* { dg-error "'__ea' specified for parameter 'x'" } */
40
{ }
41
 
42
void func2td (eaint x)      /* { dg-error "'__ea' specified for parameter 'x'" } */
43
{ }
44
 
45
struct st {
46
  __ea int x;               /* { dg-error "'__ea' specified for structure field 'x'" } */
47
  eaint td;                 /* { dg-error "'__ea' specified for structure field 'td'" } */
48
  int *__ea q;              /* { dg-error "'__ea' specified for structure field 'q'" } */
49
  int __ea b : 7;           /* { dg-error "'__ea' specified for structure field 'b'" } */
50
  int __ea : 1;             /* { dg-error "'__ea' specified for structure field" } */
51
} s;
52
 
53
struct A { int a; };
54
 
55
int func3 (int *__ea);      /* { dg-error "'__ea' specified for unnamed parameter" } */
56
int func3 (int *__ea x)     /* { dg-error "'__ea' specified for parameter 'x'" } */
57
{
58
  struct A i = (__ea struct A) { 1 };   /* { dg-error "compound literal qualified by address-space qualifier" } */
59
  return i.a;
60
}
61
 
62
extern __ea int ea_var;         /* { dg-message "note: previous declaration of 'ea_var' was here" } */
63
int ea_var;                     /* { dg-error "conflicting named address spaces \\(generic vs __ea\\) for 'ea_var'" } */
64
 
65
extern eaint ea_var_td;         /* { dg-message "note: previous declaration of 'ea_var_td' was here" } */
66
int ea_var_td;                  /* { dg-error "conflicting named address spaces \\(generic vs __ea\\) for 'ea_var_td'" } */
67
 

powered by: WebSVN 2.1.0

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