summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/debug/dwarf2/short-circuit.c
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/gcc.dg/debug/dwarf2/short-circuit.c
downloadcbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2
cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/gcc.dg/debug/dwarf2/short-circuit.c')
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/short-circuit.c108
1 files changed, 108 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/short-circuit.c b/gcc/testsuite/gcc.dg/debug/dwarf2/short-circuit.c
new file mode 100644
index 000000000..7e745ff19
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/short-circuit.c
@@ -0,0 +1,108 @@
+/* { dg-do compile } */
+/* { dg-options "-O0 -gdwarf-2 -dA" } */
+
+#define True 1
+#define False 0
+
+_Bool F1 (_Bool B1, _Bool B2)
+{
+ _Bool R;
+
+ if (B1
+ && B2)
+ R = True;
+ else
+ R = False;
+ return R;
+}
+
+_Bool F2 (_Bool B1, _Bool B2)
+{
+ _Bool R;
+
+ R = B1
+ && B2;
+ return R;
+}
+
+_Bool F3 (_Bool B1, _Bool B2)
+{
+ _Bool R = False;
+
+ if (B1
+ && B2)
+ R = True;
+ return R;
+}
+
+_Bool F4 (_Bool B1, _Bool B2)
+{
+ _Bool R = False;
+
+ if (B1
+ || B2)
+ ;
+ else
+ R = True;
+ return R;
+}
+
+_Bool F5 (_Bool B1, _Bool B2)
+{
+ _Bool R = False;
+
+ if (!(B1
+ && B2))
+ R = True;
+ return R;
+}
+
+_Bool F8 (_Bool B1, _Bool B2, _Bool B3, _Bool B4, _Bool B5, _Bool B6,
+ _Bool B7, _Bool B8)
+{
+ _Bool R;
+
+ if ((B1
+ || B2)
+ && B3
+ && !(B4
+ || B5)
+ && (B6
+ || (B7
+ && B8)))
+ R = True;
+ else
+ R = False;
+ return R;
+}
+
+/* { dg-final { scan-assembler "short-circuit.c:11" } } */
+/* { dg-final { scan-assembler "short-circuit.c:12" } } */
+/* { dg-final { scan-assembler "short-circuit.c:13" } } */
+/* { dg-final { scan-assembler "short-circuit.c:15" } } */
+
+/* { dg-final { scan-assembler "short-circuit.c:23" } } */
+/* { dg-final { scan-assembler "short-circuit.c:24" } } */
+
+/* { dg-final { scan-assembler "short-circuit.c:32" } } */
+/* { dg-final { scan-assembler "short-circuit.c:33" } } */
+/* { dg-final { scan-assembler "short-circuit.c:34" } } */
+
+/* { dg-final { scan-assembler "short-circuit.c:42" } } */
+/* { dg-final { scan-assembler "short-circuit.c:43" } } */
+/* { dg-final { scan-assembler "short-circuit.c:46" } } */
+
+/* { dg-final { scan-assembler "short-circuit.c:54" } } */
+/* { dg-final { scan-assembler "short-circuit.c:55" } } */
+/* { dg-final { scan-assembler "short-circuit.c:56" } } */
+
+/* { dg-final { scan-assembler "short-circuit.c:65" } } */
+/* { dg-final { scan-assembler "short-circuit.c:66" } } */
+/* { dg-final { scan-assembler "short-circuit.c:67" } } */
+/* { dg-final { scan-assembler "short-circuit.c:68" } } */
+/* { dg-final { scan-assembler "short-circuit.c:69" } } */
+/* { dg-final { scan-assembler "short-circuit.c:70" } } */
+/* { dg-final { scan-assembler "short-circuit.c:71" } } */
+/* { dg-final { scan-assembler "short-circuit.c:72" } } */
+/* { dg-final { scan-assembler "short-circuit.c:73" } } */
+/* { dg-final { scan-assembler "short-circuit.c:75" } } */