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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [guality/] [guality.exp] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
# This harness is for tests that should be run at all optimisation levels.
2
 
3
load_lib gcc-dg.exp
4
load_lib gcc-gdb-test.exp
5
 
6
# Disable on darwin until radr://7264615 is resolved.
7
if { [istarget *-*-darwin*] } {
8
  return
9
}
10
 
11
proc check_guality {args} {
12
    set result [eval check_compile guality_check executable $args "-g -O0"]
13
    set lines [lindex $result 0]
14
    set output [lindex $result 1]
15
    set ret 0
16
    if {[string match "" $lines]} {
17
      set execout [gcc_load "./$output"]
18
      set ret [string match "*1 PASS, 0 FAIL, 0 UNRESOLVED*" $execout]
19
    }
20
    remote_file build delete $output
21
    return $ret
22
}
23
 
24
dg-init
25
 
26
global GDB
27
if ![info exists ::env(GUALITY_GDB_NAME)] {
28
    if [info exists GDB] {
29
        set guality_gdb_name "$GDB"
30
    } else {
31
        set guality_gdb_name "[transform gdb]"
32
    }
33
    setenv GUALITY_GDB_NAME "$guality_gdb_name"
34
}
35
 
36
if {[check_guality "
37
  #include \"$srcdir/$subdir/guality.h\"
38
  volatile long int varl = 6;
39
  int main (int argc, char *argv\[\])
40
  {
41
    GUALCHKVAL (varl);
42
    return 0;
43
  }
44
"]} {
45
  gcc-dg-runtest [lsort [glob $srcdir/$subdir/*.c]] ""
46
}
47
 
48
if [info exists guality_gdb_name] {
49
    unsetenv GUALITY_GDB_NAME
50
}
51
 
52
dg-finish

powered by: WebSVN 2.1.0

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