public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/94539] New: gcc.dg/alias-14.c fails on gcc 10, succeeds on gcc 9, when turned into an execution test
@ 2020-04-09 12:37 ppalka at gcc dot gnu.org
  2020-04-09 13:28 ` [Bug middle-end/94539] [10 Regression] " rguenth at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-04-09 12:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94539

            Bug ID: 94539
           Summary: gcc.dg/alias-14.c fails on gcc 10, succeeds on gcc 9,
                    when turned into an execution test
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppalka at gcc dot gnu.org
  Target Milestone: ---

The test gcc/testsuite/gcc.dg/alias-14.c fails when compiled and executed with
gcc 10, and succeeds when compiled and executed with gcc 9.

It was added in r6-1220 as a compile-only test, but seems like it should be an
execution test?  Apologies in advance if this test is bogus as an execution
test.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/94539] [10 Regression] gcc.dg/alias-14.c fails on gcc 10, succeeds on gcc 9, when turned into an execution test
  2020-04-09 12:37 [Bug middle-end/94539] New: gcc.dg/alias-14.c fails on gcc 10, succeeds on gcc 9, when turned into an execution test ppalka at gcc dot gnu.org
@ 2020-04-09 13:28 ` rguenth at gcc dot gnu.org
  2020-04-09 14:02 ` hubicka at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-04-09 13:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94539

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-04-09
   Target Milestone|---                         |10.0
                 CC|                            |hubicka at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org
           Keywords|                            |wrong-code
             Status|UNCONFIRMED                 |NEW
            Summary|gcc.dg/alias-14.c fails on  |[10 Regression]
                   |gcc 10, succeeds on gcc 9,  |gcc.dg/alias-14.c fails on
                   |when turned into an         |gcc 10, succeeds on gcc 9,
                   |execution test              |when turned into an
                   |                            |execution test

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
On x86_64 we're failing

  /* Again we should make void * in the structure conflict with any pointer. 
*/
  asm ("":"=r"(ptr):"0"(&c));
  c.a=NULL;
  *ptr=(float*)(size_t)1;
  if (!c.a)
    __builtin_abort ();

and at that point FRE1 already has

  <bb 10> :
  __asm__("" : "=r" ptr_23 : "0" &b);
  *ptr_23 = 1B;
  __asm__("" : "=r" ptr_26 : "0" &c);
  c.a = 0B;
  *ptr_26 = 1B;
  __builtin_abort ();

I'll have a more detailed look.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/94539] [10 Regression] gcc.dg/alias-14.c fails on gcc 10, succeeds on gcc 9, when turned into an execution test
  2020-04-09 12:37 [Bug middle-end/94539] New: gcc.dg/alias-14.c fails on gcc 10, succeeds on gcc 9, when turned into an execution test ppalka at gcc dot gnu.org
  2020-04-09 13:28 ` [Bug middle-end/94539] [10 Regression] " rguenth at gcc dot gnu.org
@ 2020-04-09 14:02 ` hubicka at gcc dot gnu.org
  2020-04-09 16:37 ` ppalka at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hubicka at gcc dot gnu.org @ 2020-04-09 14:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94539

--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Hmm, the testcase is mine so I will take a look (and make it dg-do-run :)
Honza

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/94539] [10 Regression] gcc.dg/alias-14.c fails on gcc 10, succeeds on gcc 9, when turned into an execution test
  2020-04-09 12:37 [Bug middle-end/94539] New: gcc.dg/alias-14.c fails on gcc 10, succeeds on gcc 9, when turned into an execution test ppalka at gcc dot gnu.org
  2020-04-09 13:28 ` [Bug middle-end/94539] [10 Regression] " rguenth at gcc dot gnu.org
  2020-04-09 14:02 ` hubicka at gcc dot gnu.org
@ 2020-04-09 16:37 ` ppalka at gcc dot gnu.org
  2020-04-14  6:14 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-04-09 16:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94539

--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Bisection seems to be pointing to r10-779

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/94539] [10 Regression] gcc.dg/alias-14.c fails on gcc 10, succeeds on gcc 9, when turned into an execution test
  2020-04-09 12:37 [Bug middle-end/94539] New: gcc.dg/alias-14.c fails on gcc 10, succeeds on gcc 9, when turned into an execution test ppalka at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-04-09 16:37 ` ppalka at gcc dot gnu.org
@ 2020-04-14  6:14 ` rguenth at gcc dot gnu.org
  2020-04-14  6:14 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-04-14  6:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94539

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Yeah, this commit has caused other issues in the past that are meanwhile fixed
though.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/94539] [10 Regression] gcc.dg/alias-14.c fails on gcc 10, succeeds on gcc 9, when turned into an execution test
  2020-04-09 12:37 [Bug middle-end/94539] New: gcc.dg/alias-14.c fails on gcc 10, succeeds on gcc 9, when turned into an execution test ppalka at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-04-14  6:14 ` rguenth at gcc dot gnu.org
@ 2020-04-14  6:14 ` rguenth at gcc dot gnu.org
  2020-04-14 11:15 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-04-14  6:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94539

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/94539] [10 Regression] gcc.dg/alias-14.c fails on gcc 10, succeeds on gcc 9, when turned into an execution test
  2020-04-09 12:37 [Bug middle-end/94539] New: gcc.dg/alias-14.c fails on gcc 10, succeeds on gcc 9, when turned into an execution test ppalka at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-04-14  6:14 ` rguenth at gcc dot gnu.org
@ 2020-04-14 11:15 ` rguenth at gcc dot gnu.org
  2020-04-15  7:19 ` cvs-commit at gcc dot gnu.org
  2020-04-15  7:20 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-04-14 11:15 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94539

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Like

diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index df9ba0de0d6..2850141303e 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -831,6 +831,15 @@ same_type_for_tbaa (tree type1, tree type2)
       && TREE_CODE (type2) == ARRAY_TYPE)
     return -1;

+  /* void * is compatible with all other pointers.  */
+  if (POINTER_TYPE_P (type1)
+      && POINTER_TYPE_P (type2)
+      && (TREE_CODE (TREE_TYPE (type1)) == VOID_TYPE
+         || TYPE_STRUCTURAL_EQUALITY_P (TREE_TYPE (type1))
+         || TREE_CODE (TREE_TYPE (type2)) == VOID_TYPE
+         || TYPE_STRUCTURAL_EQUALITY_P (TREE_TYPE (type2))))
+    return -1;
+
   /* ??? In Ada, an lvalue of an unconstrained type can be used to access an
      object of one of its constrained subtypes, e.g. when a function with an
      unconstrained parameter passed by reference is called on an object and

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/94539] [10 Regression] gcc.dg/alias-14.c fails on gcc 10, succeeds on gcc 9, when turned into an execution test
  2020-04-09 12:37 [Bug middle-end/94539] New: gcc.dg/alias-14.c fails on gcc 10, succeeds on gcc 9, when turned into an execution test ppalka at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2020-04-14 11:15 ` rguenth at gcc dot gnu.org
@ 2020-04-15  7:19 ` cvs-commit at gcc dot gnu.org
  2020-04-15  7:20 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-15  7:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94539

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:e71b408aa242ffc76ffd19ebcdbd40279a1d9349

commit r10-7730-ge71b408aa242ffc76ffd19ebcdbd40279a1d9349
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Apr 14 13:16:25 2020 +0200

    middle-end/94539 - void * aliases every other pointer

    This makes same_type_for_tbaa_p conservative in the same way
    get_alias_set is about void * which we allow to alias all other
    pointers.

    2020-04-15  Richard Biener  <rguenther@suse.de>

            PR middle-end/94539
            * tree-ssa-alias.c (same_type_for_tbaa): Defer to
            alias_sets_conflict_p for pointers.

            * gcc.dg/alias-14.c: Make dg-do run.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug middle-end/94539] [10 Regression] gcc.dg/alias-14.c fails on gcc 10, succeeds on gcc 9, when turned into an execution test
  2020-04-09 12:37 [Bug middle-end/94539] New: gcc.dg/alias-14.c fails on gcc 10, succeeds on gcc 9, when turned into an execution test ppalka at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2020-04-15  7:19 ` cvs-commit at gcc dot gnu.org
@ 2020-04-15  7:20 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-04-15  7:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94539

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-04-15  7:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-09 12:37 [Bug middle-end/94539] New: gcc.dg/alias-14.c fails on gcc 10, succeeds on gcc 9, when turned into an execution test ppalka at gcc dot gnu.org
2020-04-09 13:28 ` [Bug middle-end/94539] [10 Regression] " rguenth at gcc dot gnu.org
2020-04-09 14:02 ` hubicka at gcc dot gnu.org
2020-04-09 16:37 ` ppalka at gcc dot gnu.org
2020-04-14  6:14 ` rguenth at gcc dot gnu.org
2020-04-14  6:14 ` rguenth at gcc dot gnu.org
2020-04-14 11:15 ` rguenth at gcc dot gnu.org
2020-04-15  7:19 ` cvs-commit at gcc dot gnu.org
2020-04-15  7:20 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).