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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [deduct5.C] - Blame information for rev 823

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

Line No. Rev Author Line
1 149 jeremybenn
// { dg-do run  }
2
// Copyright (C) 2000 Free Software Foundation, Inc.
3
// Contributed by Nathan Sidwell 13 Feb 2001 
4
 
5
// Bug 1960. We were not dealing with qualified array types properly.
6
 
7
#include 
8
 
9
template  int Foo (T const *ptr)
10
{
11
  static int count;
12
 
13
  printf ("%s\n", __PRETTY_FUNCTION__);
14
  count++;
15
 
16
  return count;
17
}
18
 
19
int main ()
20
{
21
  static int const cs = 1;
22
  static int const ca[1] = {1};
23
  static int s = 1;
24
  static int a[1] = {1};
25
 
26
  Foo (&cs);
27
  Foo (&ca);
28
  if (Foo (&s) != 2)
29
    return 1;
30
  if (Foo (&a) != 2)
31
    return 2;
32
 
33
  return 0;
34
}

powered by: WebSVN 2.1.0

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