import gdb-1999-06-28 snapshot
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / logical.exp
index 0458e61cb112cb219b9ea6f95f78ee49a3ffc704..9d410c6f61f628a66683717f66e474d0303ac359 100644 (file)
@@ -44,7 +44,9 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
      gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
     }
 
-
+if [get_compiler_info ${binfile}] {
+    return -1;
+}
 
 gdb_exit
 gdb_start
@@ -102,7 +104,7 @@ gdb_expect {
 
 send_gdb "print x && y\n"
 gdb_expect {
-    -re ".*0.*$gdb_prompt $" {
+    -re ".*$false.*$gdb_prompt $" {
         pass "print value of x<y"
       }
     -re ".*$gdb_prompt $" { fail "print value of x<y" }
@@ -113,7 +115,7 @@ gdb_expect {
 
 send_gdb "print x || y\n"
 gdb_expect {
-    -re ".*0.*$gdb_prompt $" {
+    -re ".*$false.*$gdb_prompt $" {
         pass "print value of x<=y"
       }
     -re ".*$gdb_prompt $" { fail "print value of x<=y" }
@@ -122,7 +124,7 @@ gdb_expect {
 
 send_gdb "print !x\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of x>y"
       }
     -re ".*$gdb_prompt $" { fail "print value of x>y" }
@@ -133,7 +135,7 @@ gdb_test "set variable y=1" "" "set variable y=1"
 
 send_gdb "print x && y\n"
 gdb_expect {
-    -re ".*0.*$gdb_prompt $" {
+    -re ".*$false.*$gdb_prompt $" {
         pass "print value of x<y"
       }
     -re ".*$gdb_prompt $" { fail "print value of x<y" }
@@ -144,7 +146,7 @@ gdb_expect {
 
 send_gdb "print x || y\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of x<=y"
       }
     -re ".*$gdb_prompt $" { fail "print value of x<=y" }
@@ -155,7 +157,7 @@ gdb_test "set variable x=1" "" "set variable x=1"
 
 send_gdb "print x && y\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of x<y"
       }
     -re ".*$gdb_prompt $" { fail "print value of x<y" }
@@ -166,7 +168,7 @@ gdb_expect {
 
 send_gdb "print x || y\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of x<=y"
       }
     -re ".*$gdb_prompt $" { fail "print value of x<=y" }
@@ -175,7 +177,7 @@ gdb_expect {
 
 send_gdb "print !x\n"
 gdb_expect {
-    -re ".*0.*$gdb_prompt $" {
+    -re ".*$false.*$gdb_prompt $" {
         pass "print value of x>y"
       }
     -re ".*$gdb_prompt $" { fail "print value of x>y" }
@@ -186,7 +188,7 @@ gdb_test "set variable y=0" "" "set variable y=0"
 
 send_gdb "print x && y\n"
 gdb_expect {
-    -re ".*0.*$gdb_prompt $" {
+    -re ".*$false.*$gdb_prompt $" {
         pass "print value of x<y"
       }
     -re ".*$gdb_prompt $" { fail "print value of x<y" }
@@ -197,7 +199,7 @@ gdb_expect {
 
 send_gdb "print x || y\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of x<=y"
       }
     -re ".*$gdb_prompt $" { fail "print value of x<=y" }
@@ -216,7 +218,7 @@ gdb_test "set variable z=0" "" "set variable z=0"
 
 send_gdb "print x && y && z\n"
 gdb_expect {
-    -re ".*0.*$gdb_prompt $" {
+    -re ".*$false.*$gdb_prompt $" {
         pass "print value of x &&  y && z (000)"
       }
     -re ".*$gdb_prompt $" { fail "print value of x && y && z (000) " }
@@ -225,7 +227,7 @@ gdb_expect {
 
 send_gdb "print x || y || z\n"
 gdb_expect {
-    -re ".*0.*$gdb_prompt $" {
+    -re ".*$false.*$gdb_prompt $" {
         pass "print value of x || y || z (000)"
       }
     -re ".*$gdb_prompt $" { fail "print value of x || y || z (000)" }
@@ -234,7 +236,7 @@ gdb_expect {
 
 send_gdb "print !!x\n"
 gdb_expect {
-    -re ".*0.*$gdb_prompt $" {
+    -re ".*$false.*$gdb_prompt $" {
         pass "print value of !!x (0)"
       }
     -re ".*$gdb_prompt $" { fail "print value of !!x (0)" }
@@ -246,7 +248,7 @@ gdb_test "set variable y=1" "" "set variable y=1"
 
 send_gdb "print x && y && z\n"
 gdb_expect {
-    -re ".*0.*$gdb_prompt $" {
+    -re ".*$false.*$gdb_prompt $" {
         pass "print value of x &&  y && z (010)"
       }
     -re ".*$gdb_prompt $" { fail "print value of x && y && z (010) " }
@@ -255,7 +257,7 @@ gdb_expect {
 
 send_gdb "print x || y || z\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of x || y || z (010)"
       }
     -re ".*$gdb_prompt $" { fail "print value of x || y || z (010)" }
@@ -267,7 +269,7 @@ gdb_test "set variable z=1" "" "set variable z=1"
 
 send_gdb "print x && y && z\n"
 gdb_expect {
-    -re ".*0.*$gdb_prompt $" {
+    -re ".*$false.*$gdb_prompt $" {
         pass "print value of x &&  y && z (011)"
       }
     -re ".*$gdb_prompt $" { fail "print value of x && y && z (011) " }
@@ -276,7 +278,7 @@ gdb_expect {
 
 send_gdb "print x || y || z\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of x || y || z (011)"
       }
     -re ".*$gdb_prompt $" { fail "print value of x || y || z (011)" }
@@ -288,7 +290,7 @@ gdb_test "set variable x=1" "" "set variable x=1"
 
 send_gdb "print x && y && z\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of x &&  y && z (111)"
       }
     -re ".*$gdb_prompt $" { fail "print value of x && y && z (111) " }
@@ -297,7 +299,7 @@ gdb_expect {
 
 send_gdb "print x || y || z\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of x || y || z (111)"
       }
     -re ".*$gdb_prompt $" { fail "print value of x || y || z (111)" }
@@ -306,7 +308,7 @@ gdb_expect {
 
 send_gdb "print !!x\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of !!x (1)"
       }
     -re ".*$gdb_prompt $" { fail "print value of !!x (1)" }
@@ -318,7 +320,7 @@ gdb_test "set variable z=0" "" "set variable z=0"
 
 send_gdb "print x && y && z\n"
 gdb_expect {
-    -re ".*0.*$gdb_prompt $" {
+    -re ".*$false.*$gdb_prompt $" {
         pass "print value of x &&  y && z (110)"
       }
     -re ".*$gdb_prompt $" { fail "print value of x && y && z (110) " }
@@ -327,7 +329,7 @@ gdb_expect {
 
 send_gdb "print x || y || z\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of x || y || z (110)"
       }
     -re ".*$gdb_prompt $" { fail "print value of x || y || z (110)" }
@@ -341,7 +343,7 @@ gdb_test "set variable y=0" "" "set variable y=0"
 
 send_gdb "print x && y && z\n"
 gdb_expect {
-    -re ".*0.*$gdb_prompt $" {
+    -re ".*$false.*$gdb_prompt $" {
         pass "print value of x &&  y && z (100)"
       }
     -re ".*$gdb_prompt $" { fail "print value of x && y && z (100) " }
@@ -350,7 +352,7 @@ gdb_expect {
 
 send_gdb "print x || y || z\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of x || y || z (100)"
       }
     -re ".*$gdb_prompt $" { fail "print value of x || y || z (100)" }
@@ -364,7 +366,7 @@ gdb_test "set variable z=1" "" "set variable z=1"
 
 send_gdb "print x && y && z\n"
 gdb_expect {
-    -re ".*0.*$gdb_prompt $" {
+    -re ".*$false.*$gdb_prompt $" {
         pass "print value of x &&  y && z (101)"
       }
     -re ".*$gdb_prompt $" { fail "print value of x && y && z (101) " }
@@ -373,7 +375,7 @@ gdb_expect {
 
 send_gdb "print x || y || z\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of x || y || z (101)"
       }
     -re ".*$gdb_prompt $" { fail "print value of x || y || z (101)" }
@@ -385,7 +387,7 @@ gdb_test "set variable x=0" "" "set variable x=0"
 
 send_gdb "print x && y && z\n"
 gdb_expect {
-    -re ".*0.*$gdb_prompt $" {
+    -re ".*$false.*$gdb_prompt $" {
         pass "print value of x &&  y && z (001)"
       }
     -re ".*$gdb_prompt $" { fail "print value of x && y && z (001) " }
@@ -394,7 +396,7 @@ gdb_expect {
 
 send_gdb "print x || y || z\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of x || y || z (001)"
       }
     -re ".*$gdb_prompt $" { fail "print value of x || y || z (001)" }
@@ -409,7 +411,7 @@ gdb_expect {
 
 send_gdb "print !x && y\n"
 gdb_expect {
-    -re ".*0.*$gdb_prompt $" {
+    -re ".*$false.*$gdb_prompt $" {
         pass "print value of !x && y  (00)"
       }
     -re ".*$gdb_prompt $" { fail "print value of  !x && y (00)" }
@@ -422,7 +424,7 @@ gdb_test "set variable x=1" "" "set variable x=1"
 
 send_gdb "print !x && y\n"
 gdb_expect {
-    -re ".*0.*$gdb_prompt $" {
+    -re ".*$false.*$gdb_prompt $" {
         pass "print value of !x && y  (10)"
       }
     -re ".*$gdb_prompt $" { fail "print value of  !x && y (10)" }
@@ -436,7 +438,7 @@ gdb_test "set variable y=1" "" "set variable y=1"
 
 send_gdb "print !x || y\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of !x || y  (11)"
       }
     -re ".*$gdb_prompt $" { fail "print value of  !x || y (11)" }
@@ -449,7 +451,7 @@ gdb_test "set variable x=0" "" "set variable x=0"
 
 send_gdb "print !x || y\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of !x || y  (01)"
       }
     -re ".*$gdb_prompt $" { fail "print value of  !x || y (01)" }
@@ -463,7 +465,7 @@ gdb_test "set variable z=0" "" "set variable z=0"
 
 send_gdb "print x || y && z\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of x || y && z  (110)"
       }
     -re ".*$gdb_prompt $" { fail "print value of  x || y && z (110)" }
@@ -476,7 +478,7 @@ gdb_test "set variable y=0" "" "set variable y=0"
 
 send_gdb "print x || y && z\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of x || y && z (100)"
       }
     -re ".*$gdb_prompt $" { fail "print value of  x || y && z (100)" }
@@ -489,12 +491,12 @@ gdb_test "set variable x=0" "" "set variable x=0"
 
 send_gdb "print x || !y && z\n"
 gdb_expect {
-    -re ".*0.*$gdb_prompt $" {
+    -re ".*$false.*$gdb_prompt $" {
         
          gdb_test "set variable x=1" "" "set variable x=1"
          send_gdb "print x || !y && z\n"
          gdb_expect {
-             -re ".*1.*$gdb_prompt $" {
+             -re ".*$true.*$gdb_prompt $" {
                   pass "print value of x || !y && z "
              }
              -re ".*$gdb_prompt $" { fail "print value of  x || !y && z" }
@@ -517,7 +519,7 @@ gdb_test "set variable z=3" "" "set variable z=3"
 
 send_gdb "print x > y || w == z\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of x > y || w == z"
       }
     -re ".*$gdb_prompt $" { fail "print value of  x > y || w == z" }
@@ -533,7 +535,7 @@ gdb_test "set variable z=3" "" "set variable z=3"
 
 send_gdb "print x >= y && w != z\n"
 gdb_expect {
-    -re ".*0.*$gdb_prompt $" {
+    -re ".*$false.*$gdb_prompt $" {
         pass "print value of x >= y || w != z"
       }
     -re ".*$gdb_prompt $" { fail "print value of  x >= y || w != z" }
@@ -550,7 +552,7 @@ gdb_test "set variable z=3" "" "set variable z=3"
 
 send_gdb "print ! x > y || w + z\n"
 gdb_expect {
-    -re ".*1.*$gdb_prompt $" {
+    -re ".*$true.*$gdb_prompt $" {
         pass "print value of x > y || w != z"
       }
     -re ".*$gdb_prompt $" { fail "print value of  x > y || w != z" }
This page took 0.041023 seconds and 4 git commands to generate.