]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
This commit was manufactured by cvs2svn to create branch
authorNo Author <no-author@gcc.gnu.org>
Mon, 15 Jul 2002 23:59:02 +0000 (23:59 +0000)
committerNo Author <no-author@gcc.gnu.org>
Mon, 15 Jul 2002 23:59:02 +0000 (23:59 +0000)
'gcc-3_1-branch'.

From-SVN: r55469

gcc/testsuite/gcc.c-torture/compile/20020715-1.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.c-torture/compile/20020715-1.c b/gcc/testsuite/gcc.c-torture/compile/20020715-1.c
new file mode 100644 (file)
index 0000000..5294133
--- /dev/null
@@ -0,0 +1,22 @@
+/* PR optimization/7153 */
+/* Verify that GCC doesn't promote a register when its
+   lifetime is not limited to one basic block. */
+
+void f(char);
+void g(void);
+
+void scale(void)
+{
+  int width;
+  char bytes;
+  char *src;
+
+  if (width)
+  {
+    bytes = *src;
+    g();
+    width *= bytes;
+  }
+
+  f(bytes);
+}