OSDN Git Service

PR middle-end/17564
authordanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Dec 2004 04:08:39 +0000 (04:08 +0000)
committerdanglin <danglin@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 13 Dec 2004 04:08:39 +0000 (04:08 +0000)
* gcc.c-torture/execute/20041212-1.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92076 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/20041212-1.c [new file with mode: 0644]

index 05eed5a..8dd7e1c 100644 (file)
@@ -1,3 +1,8 @@
+2004-12-12  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
+
+       PR middle-end/17564
+       * gcc.c-torture/execute/20041212-1.c: New test.
+
 2004-12-12  Tobias Schlueter  <tobias.schlueter@physik.uni-muenchen.de>
 
        PR fortran/18869
diff --git a/gcc/testsuite/gcc.c-torture/execute/20041212-1.c b/gcc/testsuite/gcc.c-torture/execute/20041212-1.c
new file mode 100644 (file)
index 0000000..ea2d0fb
--- /dev/null
@@ -0,0 +1,15 @@
+/* A function pointer compared with a void pointer should not be canonicalized.
+   See PR middle-end/17564.  */
+void *f (void) __attribute__ ((__noinline__));
+void *
+f (void)
+{
+  return f;
+}
+int
+main (void)
+{
+  if (f () != f)
+    abort ();
+  exit (0);
+}