public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/38937]  New: [4.4 regression] dereferencing pointer '<anonymous>' does break  strict-aliasing
@ 2009-01-22 19:15 bkoz at gcc dot gnu dot org
  2009-01-22 21:31 ` [Bug middle-end/38937] " pinskia at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2009-01-22 19:15 UTC (permalink / raw)
  To: gcc-bugs

On s390x, there are some libstdc++ failures that are not present on other
platforms. 

Here is a representative test run:
http://gcc.gnu.org/ml/gcc-testresults/2009-01/msg02102.html

And here is the failure analysis:
http://gcc.gnu.org/ml/libstdc++/2009-01/msg00109.html

The following fails appear to be spurious and only occur on s390x. At first I
thought this might be because of the extra flags "-fstack-protector
--param=ssp-buffer-size=4" but compiling the problem testcases on x86_64/linux
with the same flag doesn't show an error. So, I don't know what's up.

The same testcases (when present) pass without error on 4.3.2.

FAIL: 21_strings/basic_string/element_access/wchar_t/empty.cc
FAIL: 23_containers/list/modifiers/1.cc
FAIL: 23_containers/list/modifiers/3.cc
FAIL: 23_containers/list/modifiers/insert/25288.cc

The usual error looks like:

warning: dereferencing pointer '<anonymous>' does break strict-aliasing
rules

which is incomprehensible.


-- 
           Summary: [4.4 regression] dereferencing pointer '<anonymous>'
                    does break  strict-aliasing
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bkoz at gcc dot gnu dot org
  GCC host triplet: s390x-redhat-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38937


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

* [Bug middle-end/38937] [4.4 regression] dereferencing pointer '<anonymous>' does break  strict-aliasing
  2009-01-22 19:15 [Bug middle-end/38937] New: [4.4 regression] dereferencing pointer '<anonymous>' does break strict-aliasing bkoz at gcc dot gnu dot org
@ 2009-01-22 21:31 ` pinskia at gcc dot gnu dot org
  2009-01-22 22:45 ` rguenth at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-22 21:31 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
            Summary|[4.4 regression]            |[4.4 regression]
                   |dereferencing pointer       |dereferencing pointer
                   |'<anonymous>' does break    |'<anonymous>' does break
                   |strict-aliasing             |strict-aliasing
   Target Milestone|---                         |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38937


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

* [Bug middle-end/38937] [4.4 regression] dereferencing pointer '<anonymous>' does break  strict-aliasing
  2009-01-22 19:15 [Bug middle-end/38937] New: [4.4 regression] dereferencing pointer '<anonymous>' does break strict-aliasing bkoz at gcc dot gnu dot org
  2009-01-22 21:31 ` [Bug middle-end/38937] " pinskia at gcc dot gnu dot org
@ 2009-01-22 22:45 ` rguenth at gcc dot gnu dot org
  2009-01-25 18:05 ` [Bug middle-end/38937] [4.4 Regression] " rguenth at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-22 22:45 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rguenth at gcc dot gnu dot org  2009-01-22 22:44 -------
This is likely because of different inlining decisions which is possibly
because
of different insn costs which depend on MOVE_MAX_PIECES and MOVE_RATIO.

The warning itself hints at either an alias problem in the testcase or the
library or at a problem with points-to analysis.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38937


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

* [Bug middle-end/38937] [4.4 Regression] dereferencing pointer '<anonymous>' does break  strict-aliasing
  2009-01-22 19:15 [Bug middle-end/38937] New: [4.4 regression] dereferencing pointer '<anonymous>' does break strict-aliasing bkoz at gcc dot gnu dot org
  2009-01-22 21:31 ` [Bug middle-end/38937] " pinskia at gcc dot gnu dot org
  2009-01-22 22:45 ` rguenth at gcc dot gnu dot org
@ 2009-01-25 18:05 ` rguenth at gcc dot gnu dot org
  2009-01-28 21:38 ` rguenth at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-25 18:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2009-01-25 18:05 -------
Does the following patch fix this?

http://gcc.gnu.org/ml/gcc-patches/2009-01/msg01245.html

If so please mark this bug as a dup of PR38503.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38937


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

* [Bug middle-end/38937] [4.4 Regression] dereferencing pointer '<anonymous>' does break  strict-aliasing
  2009-01-22 19:15 [Bug middle-end/38937] New: [4.4 regression] dereferencing pointer '<anonymous>' does break strict-aliasing bkoz at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-01-25 18:05 ` [Bug middle-end/38937] [4.4 Regression] " rguenth at gcc dot gnu dot org
@ 2009-01-28 21:38 ` rguenth at gcc dot gnu dot org
  2009-01-30 16:57 ` paolo dot carlini at oracle dot com
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-28 21:38 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38937


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

* [Bug middle-end/38937] [4.4 Regression] dereferencing pointer '<anonymous>' does break  strict-aliasing
  2009-01-22 19:15 [Bug middle-end/38937] New: [4.4 regression] dereferencing pointer '<anonymous>' does break strict-aliasing bkoz at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-01-28 21:38 ` rguenth at gcc dot gnu dot org
@ 2009-01-30 16:57 ` paolo dot carlini at oracle dot com
  2009-01-30 16:58 ` paolo dot carlini at oracle dot com
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-01-30 16:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from paolo dot carlini at oracle dot com  2009-01-30 16:57 -------
In the meanwhile the patch for PR38503 has been installed and unfortunately I
have to report that this issue seems indeed different, eg, this testcase is
still not fixed on x86_64-linux:

#include <string>
#include <list>

class A;

class B {
public:
    void foo(A&);
    std::string s;
};

class A {
public:
    A& qaz() {
        l.push_back( new A() );
        return *l.back();
    }
    std::list<A*> l;
};

void bar()
{
    A a;
    B b;
    b.foo(a.qaz());
}


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|0000-00-00 00:00:00         |2009-01-30 16:57:42
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38937


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

* [Bug middle-end/38937] [4.4 Regression] dereferencing pointer '<anonymous>' does break  strict-aliasing
  2009-01-22 19:15 [Bug middle-end/38937] New: [4.4 regression] dereferencing pointer '<anonymous>' does break strict-aliasing bkoz at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2009-01-30 16:57 ` paolo dot carlini at oracle dot com
@ 2009-01-30 16:58 ` paolo dot carlini at oracle dot com
  2009-01-30 22:20 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-01-30 16:58 UTC (permalink / raw)
  To: gcc-bugs



-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|2009-01-30 16:57:42         |2009-01-30 16:58:36
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38937


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

* [Bug middle-end/38937] [4.4 Regression] dereferencing pointer '<anonymous>' does break  strict-aliasing
  2009-01-22 19:15 [Bug middle-end/38937] New: [4.4 regression] dereferencing pointer '<anonymous>' does break strict-aliasing bkoz at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2009-01-30 16:58 ` paolo dot carlini at oracle dot com
@ 2009-01-30 22:20 ` rguenth at gcc dot gnu dot org
  2009-01-30 22:52 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-30 22:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rguenth at gcc dot gnu dot org  2009-01-30 22:20 -------
Confirmed on i?86 as well, even with 4.3 headers:

./cc1plus -quiet -O2 -Wall /tmp/t.ii 
t.C: In function 'void bar()':
t.C:16: warning: dereferencing pointer '<anonymous>' does break strict-aliasing
rules
/usr/include/c++/4.3/bits/stl_list.h:132: note: initialized from here

I will have a looksee.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |rguenth at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2009-01-30 16:58:36         |2009-01-30 22:20:24
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38937


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

* [Bug middle-end/38937] [4.4 Regression] dereferencing pointer '<anonymous>' does break  strict-aliasing
  2009-01-22 19:15 [Bug middle-end/38937] New: [4.4 regression] dereferencing pointer '<anonymous>' does break strict-aliasing bkoz at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2009-01-30 22:20 ` rguenth at gcc dot gnu dot org
@ 2009-01-30 22:52 ` rguenth at gcc dot gnu dot org
  2009-01-31 10:26 ` [Bug tree-optimization/38937] " rguenth at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-30 22:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rguenth at gcc dot gnu dot org  2009-01-30 22:51 -------
For

  hook (D.15560_20, &a.l.D.14002._M_impl._M_node);

we somehow compute the wrong ESCAPED solution.

ESCAPED = { NULL ANYTHING ESCAPED NONLOCAL a b D.15681 }

this is missing a.32+32.

Bah, it turns out I again have this fixed on the alias-improvements branch.
So - I have a patch.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38937


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

* [Bug tree-optimization/38937] [4.4 Regression] dereferencing pointer '<anonymous>' does break  strict-aliasing
  2009-01-22 19:15 [Bug middle-end/38937] New: [4.4 regression] dereferencing pointer '<anonymous>' does break strict-aliasing bkoz at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2009-01-31 10:26 ` [Bug tree-optimization/38937] " rguenth at gcc dot gnu dot org
@ 2009-01-31 10:26 ` rguenth at gcc dot gnu dot org
  2009-01-31 17:49 ` hjl dot tools at gmail dot com
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-31 10:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenth at gcc dot gnu dot org  2009-01-31 10:25 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

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


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38937


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

* [Bug tree-optimization/38937] [4.4 Regression] dereferencing pointer '<anonymous>' does break  strict-aliasing
  2009-01-22 19:15 [Bug middle-end/38937] New: [4.4 regression] dereferencing pointer '<anonymous>' does break strict-aliasing bkoz at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2009-01-30 22:52 ` rguenth at gcc dot gnu dot org
@ 2009-01-31 10:26 ` rguenth at gcc dot gnu dot org
  2009-01-31 10:26 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-31 10:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rguenth at gcc dot gnu dot org  2009-01-31 10:25 -------
Subject: Bug 38937

Author: rguenth
Date: Sat Jan 31 10:25:41 2009
New Revision: 143819

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143819
Log:
2009-01-30  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/38937
        * tree-ssa-structalias.c (do_sd_constraint): Do not shortcut
        computing the transitive closure.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-structalias.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38937


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

* [Bug tree-optimization/38937] [4.4 Regression] dereferencing pointer '<anonymous>' does break  strict-aliasing
  2009-01-22 19:15 [Bug middle-end/38937] New: [4.4 regression] dereferencing pointer '<anonymous>' does break strict-aliasing bkoz at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2009-01-31 10:26 ` rguenth at gcc dot gnu dot org
@ 2009-01-31 17:49 ` hjl dot tools at gmail dot com
  2009-01-31 17:53 ` rguenth at gcc dot gnu dot org
  2009-02-02 10:39 ` rguenth at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-01-31 17:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from hjl dot tools at gmail dot com  2009-01-31 17:49 -------
Don't we need to add a testcase in comment #3?


-- 

hjl dot tools at gmail dot com changed:

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


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38937


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

* [Bug tree-optimization/38937] [4.4 Regression] dereferencing pointer '<anonymous>' does break  strict-aliasing
  2009-01-22 19:15 [Bug middle-end/38937] New: [4.4 regression] dereferencing pointer '<anonymous>' does break strict-aliasing bkoz at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2009-01-31 17:49 ` hjl dot tools at gmail dot com
@ 2009-01-31 17:53 ` rguenth at gcc dot gnu dot org
  2009-02-02 10:39 ` rguenth at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-01-31 17:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rguenth at gcc dot gnu dot org  2009-01-31 17:53 -------
Feel free to reduce one.  I think using libstdc++ in g++.dg is not possible?


-- 

rguenth at gcc dot gnu dot org changed:

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


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38937


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

* [Bug tree-optimization/38937] [4.4 Regression] dereferencing pointer '<anonymous>' does break  strict-aliasing
  2009-01-22 19:15 [Bug middle-end/38937] New: [4.4 regression] dereferencing pointer '<anonymous>' does break strict-aliasing bkoz at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2009-01-31 17:53 ` rguenth at gcc dot gnu dot org
@ 2009-02-02 10:39 ` rguenth at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-02-02 10:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from rguenth at gcc dot gnu dot org  2009-02-02 10:39 -------
Subject: Bug 38937

Author: rguenth
Date: Mon Feb  2 10:39:12 2009
New Revision: 143864

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143864
Log:
2009-02-02  Richard Guenther  <rguenther@suse.de>

        PR tree-optimization/38937
        * g++.dg/warn/Wstrict-aliasing-bogus-escape.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-bogus-escape.C
Modified:
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38937


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

end of thread, other threads:[~2009-02-02 10:39 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-22 19:15 [Bug middle-end/38937] New: [4.4 regression] dereferencing pointer '<anonymous>' does break strict-aliasing bkoz at gcc dot gnu dot org
2009-01-22 21:31 ` [Bug middle-end/38937] " pinskia at gcc dot gnu dot org
2009-01-22 22:45 ` rguenth at gcc dot gnu dot org
2009-01-25 18:05 ` [Bug middle-end/38937] [4.4 Regression] " rguenth at gcc dot gnu dot org
2009-01-28 21:38 ` rguenth at gcc dot gnu dot org
2009-01-30 16:57 ` paolo dot carlini at oracle dot com
2009-01-30 16:58 ` paolo dot carlini at oracle dot com
2009-01-30 22:20 ` rguenth at gcc dot gnu dot org
2009-01-30 22:52 ` rguenth at gcc dot gnu dot org
2009-01-31 10:26 ` [Bug tree-optimization/38937] " rguenth at gcc dot gnu dot org
2009-01-31 10:26 ` rguenth at gcc dot gnu dot org
2009-01-31 17:49 ` hjl dot tools at gmail dot com
2009-01-31 17:53 ` rguenth at gcc dot gnu dot org
2009-02-02 10:39 ` rguenth at gcc dot gnu dot 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).