~ubuntu-branches/ubuntu/saucy/starpu-contrib/saucy

« back to all changes in this revision

Viewing changes to gcc-plugin/tests/release-errors.c

  • Committer: Package Import Robot
  • Author(s): Samuel Thibault
  • Date: 2012-04-12 15:04:15 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20120412150415-gzp107thb5wknugm
Tags: 1.0.1-1
* New upstream release.
* Explicitly use gcc-4.6 to fix plugin build (Closes: Bug#667381).
* Use gcc-4.5 for starpu, as nvcc does not actually support all 4.6
  features, notably not __float128.
* patches/relax-gcc-plugin: Relax gcc-4.6 dependency for plugins to upstream
  release version (Closes: #670422)
* watch: Fix URL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* GCC-StarPU
 
2
   Copyright (C) 2011, 2012 Institut National de Recherche en Informatique et Automatique
 
3
 
 
4
   GCC-StarPU is free software: you can redistribute it and/or modify
 
5
   it under the terms of the GNU General Public License as published by
 
6
   the Free Software Foundation, either version 3 of the License, or
 
7
   (at your option) any later version.
 
8
 
 
9
   GCC-StarPU is distributed in the hope that it will be useful,
 
10
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
   GNU General Public License for more details.
 
13
 
 
14
   You should have received a copy of the GNU General Public License
 
15
   along with GCC-StarPU.  If not, see <http://www.gnu.org/licenses/>.  */
 
16
 
 
17
extern float *y;
 
18
 
 
19
static const double a[123];
 
20
 
 
21
int
 
22
main (int argc, char *argv[])
 
23
{
 
24
#pragma starpu initialize
 
25
 
 
26
  int x[123] __attribute__ ((unused));
 
27
  static char z[345] __attribute__ ((unused));
 
28
 
 
29
#pragma starpu register x
 
30
 
 
31
#pragma starpu release /* (error "parse error") */
 
32
#pragma starpu release 123 /* (error "neither a pointer nor an array") */
 
33
#pragma starpu release does_not_exit /* (error "unbound variable") */
 
34
 
 
35
#pragma starpu release argc /* (error "neither a pointer nor an array") */
 
36
#pragma starpu release y
 
37
#pragma starpu release x
 
38
 
 
39
#pragma starpu release x z                        /* (error "junk after") */
 
40
 
 
41
  return 1;
 
42
}