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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr43864.c] - Blame information for rev 701

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-pre" } */
3
 
4
extern void foo (char*, int);
5
extern void mysprintf (char *, char *);
6
extern void myfree (void *);
7
extern int access (char *, int);
8
extern int fopen (char *, int);
9
 
10
char *
11
hprofStartupp (char *outputFileName, char *ctx)
12
{
13
  char fileName[1000];
14
  int fp;
15
  mysprintf (fileName, outputFileName);
16
  if (access (fileName, 1) == 0)
17
    {
18
      myfree (ctx);
19
      return 0;
20
    }
21
 
22
  fp = fopen (fileName, 0);
23
  if (fp == 0)
24
    {
25
      myfree (ctx);
26
      return 0;
27
    }
28
 
29
  foo (outputFileName, fp);
30
 
31
  return ctx;
32
}
33
 
34
/* { dg-final { scan-tree-dump-times "myfree \\(" 1 "pre"} } */
35
/* { dg-final { scan-tree-dump-not "Invalid sum" "pre"} } */
36
/* { dg-final { cleanup-tree-dump "pre" } } */

powered by: WebSVN 2.1.0

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