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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [plugin/] [decl-plugin-test.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
extern int global; // { dg-warning "Decl Global global" }
2
int global_array[] = { 1, 2, 3 }; // { dg-warning "Decl Global global_array" }
3
 
4
int takes_args(int arg1, int arg2)
5
{
6
  int local = arg1 + arg2 + global; // { dg-warning "Decl Local local" }
7
  return local + 1;
8
}
9
 
10
int global = 12; // { dg-warning "Decl Global global" }
11
 
12
struct test_str {
13
  int field; // { dg-warning "Decl Field field" }
14
};
15
 
16
class test_class {
17
  int class_field1; // { dg-warning "Decl Field class_field1" }
18
  int class_field2; // { dg-warning "Decl Field class_field2" }
19
 
20
  test_class() // { dg-warning "Decl Function test_class" }
21
    : class_field1(0), class_field2(0)
22
  {}
23
 
24
  void swap_fields(int bias) // { dg-warning "Decl Function swap_fields" }
25
  {
26
    int temp = class_field1 + bias; // { dg-warning "Decl Local temp" }
27
    class_field1 = class_field2 - bias;
28
    class_field2 = temp;
29
  }
30
};

powered by: WebSVN 2.1.0

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