public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/59201] New: [4.9 Regression] error: stmt (0x7f01c4708130) marked modified after optimization pass
@ 2013-11-20  5:43 octoploid at yandex dot com
  2013-11-20  6:49 ` [Bug ipa/59201] " octoploid at yandex dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: octoploid at yandex dot com @ 2013-11-20  5:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59201
           Summary: [4.9 Regression] error: stmt (0x7f01c4708130) marked
                    modified after optimization pass
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: octoploid at yandex dot com

markus@x4 src % cat test.ii
class A {
public:
  virtual void m_fn1();
};
class B final : A {
  ~B();
  virtual void m_fn2() { m_fn1(); }
};
B::~B() {}

markus@x4 src % g++ -c -std=c++11 -O2 test.ii
test.ii: In member function ‘virtual void B::m_fn2()’:
test.ii:7:16: error: stmt (0x7f96e3a9e130) marked modified after optimization
pass: 
   virtual void m_fn2() { m_fn1(); }
                ^
# .MEM_6 = VDEF <.MEM_2(D)>
A::m_fn1 (_5);
test.ii:7:16: internal compiler error: verify_ssa failed
0xcc71df verify_ssa(bool)
        ../../gcc/gcc/tree-ssa.c:1092
0xa7fffc execute_function_todo
        ../../gcc/gcc/passes.c:1842
0xa80883 execute_todo
        ../../gcc/gcc/passes.c:1875
0xa826f1 execute_one_ipa_transform_pass
        ../../gcc/gcc/passes.c:2060
0xa826f1 execute_all_ipa_transforms()
        ../../gcc/gcc/passes.c:2091
0x822eb0 expand_function
        ../../gcc/gcc/cgraphunit.c:1753
0x824fe7 expand_all_functions
        ../../gcc/gcc/cgraphunit.c:1865
0x824fe7 compile()
        ../../gcc/gcc/cgraphunit.c:2199
0x825504 finalize_compilation_unit()
        ../../gcc/gcc/cgraphunit.c:2276
0x6217ae cp_write_global_declarations()
        ../../gcc/gcc/cp/decl2.c:4408
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
markus@x4 src %
>From gcc-bugs-return-435166-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Nov 20 06:03:38 2013
Return-Path: <gcc-bugs-return-435166-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 814 invoked by alias); 20 Nov 2013 06:03:37 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 749 invoked by uid 48); 20 Nov 2013 06:03:34 -0000
From: "ian_harvey at bigpond dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/59202] New: Erroneous argument aliasing with defined assignment
Date: Wed, 20 Nov 2013 06:03:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: unknown
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: ian_harvey at bigpond dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter
Message-ID: <bug-59202-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-11/txt/msg01943.txt.bz2
Content-length: 2300

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY202

            Bug ID: 59202
           Summary: Erroneous argument aliasing with defined assignment
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ian_harvey at bigpond dot com

gfortran build from very recent trunk does not appear to be correctly handling
the case when an object with allocatable components is self assigned and
defined assignment is accessible.

For example:

MODULE DefinedAssignmentModule
  IMPLICIT NONE
  TYPE :: t
    INTEGER, ALLOCATABLE :: array(:)
  END TYPE t
  INTERFACE ASSIGNMENT(=)
    MODULE PROCEDURE def_assign
  END INTERFACE ASSIGNMENT(=)
CONTAINS
  SUBROUTINE def_assign(lhs, rhs)
    TYPE(t), INTENT(OUT) :: lhs   ! Investigate INOUT too.
    TYPE(t), INTENT(IN) :: rhs
    !*****
    ! Allocation status of lhs and rhs on entry.
    PRINT "(*(L1,:,1X))", ALLOCATED(lhs%array), ALLOCATED(rhs%array)
    ! Change allocation status of lhs
    IF (ALLOCATED(lhs%array)) DEALLOCATE(lhs%array)
    ALLOCATE(lhs%array(5))
    ! Resulting allocation status of lhs and rhs.
    PRINT "(1X,*(L1,:,1X))", ALLOCATED(lhs%array), ALLOCATED(rhs%array)
  END SUBROUTINE def_assign
  SUBROUTINE reset(obj)
    TYPE(t), INTENT(OUT) :: obj
  END SUBROUTINE reset
END MODULE DefinedAssignmentModule

PROGRAM DefinedAssignmentTest
  USE DefinedAssignmentModule
  IMPLICIT NONE
  TYPE(t) :: a

  ! This...
  a = a

  CALL reset(a)
  ! ...should be equivalent to this...
  CALL def_assign(a, (a))

  CALL reset(a)
  ALLOCATE(a%array(2))
  a = a     ! rhs should be allocated on entry.

END PROGRAM DefinedAssignmentTest

results in:

F F
 T T
F F
 T F
F F
 T T

The first two lines indicate that changes to lhs inside the procedure result in
changes to rhs (even though rhs is equivalent to the the value of a
parenthesised expression per F2008 12.4.3.4.3 - hence the two arguments are not
aliased).

The third and fourth lines indicate that the compiler is correctly handling
explicit passing of a parenthesised expression.

The fifth and sixth lines indicate that application of INTENT(OUT) to lhs is
affecting rhs on entry to the procedure.


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

* [Bug ipa/59201] [4.9 Regression] error: stmt (0x7f01c4708130) marked modified after optimization pass
  2013-11-20  5:43 [Bug ipa/59201] New: [4.9 Regression] error: stmt (0x7f01c4708130) marked modified after optimization pass octoploid at yandex dot com
@ 2013-11-20  6:49 ` octoploid at yandex dot com
  2013-11-20 10:42 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: octoploid at yandex dot com @ 2013-11-20  6:49 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <octoploid at yandex dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu.org

--- Comment #1 from Markus Trippelsdorf <octoploid at yandex dot com> ---
Started with r205019.


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

* [Bug ipa/59201] [4.9 Regression] error: stmt (0x7f01c4708130) marked modified after optimization pass
  2013-11-20  5:43 [Bug ipa/59201] New: [4.9 Regression] error: stmt (0x7f01c4708130) marked modified after optimization pass octoploid at yandex dot com
  2013-11-20  6:49 ` [Bug ipa/59201] " octoploid at yandex dot com
@ 2013-11-20 10:42 ` rguenth at gcc dot gnu.org
  2013-11-25  9:10 ` rguenth at gcc dot gnu.org
  2013-12-08 10:21 ` octoploid at yandex dot com
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-20 10:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-11-20
   Target Milestone|---                         |4.9.0
     Ever confirmed|0                           |1


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

* [Bug ipa/59201] [4.9 Regression] error: stmt (0x7f01c4708130) marked modified after optimization pass
  2013-11-20  5:43 [Bug ipa/59201] New: [4.9 Regression] error: stmt (0x7f01c4708130) marked modified after optimization pass octoploid at yandex dot com
  2013-11-20  6:49 ` [Bug ipa/59201] " octoploid at yandex dot com
  2013-11-20 10:42 ` rguenth at gcc dot gnu.org
@ 2013-11-25  9:10 ` rguenth at gcc dot gnu.org
  2013-12-08 10:21 ` octoploid at yandex dot com
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-25  9:10 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zhenqiang.chen at linaro dot org

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
*** Bug 59282 has been marked as a duplicate of this bug. ***


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

* [Bug ipa/59201] [4.9 Regression] error: stmt (0x7f01c4708130) marked modified after optimization pass
  2013-11-20  5:43 [Bug ipa/59201] New: [4.9 Regression] error: stmt (0x7f01c4708130) marked modified after optimization pass octoploid at yandex dot com
                   ` (2 preceding siblings ...)
  2013-11-25  9:10 ` rguenth at gcc dot gnu.org
@ 2013-12-08 10:21 ` octoploid at yandex dot com
  3 siblings, 0 replies; 5+ messages in thread
From: octoploid at yandex dot com @ 2013-12-08 10:21 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <octoploid at yandex dot com> changed:

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

--- Comment #3 from Markus Trippelsdorf <octoploid at yandex dot com> ---
Seems to be fixed.


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

end of thread, other threads:[~2013-12-08 10:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-20  5:43 [Bug ipa/59201] New: [4.9 Regression] error: stmt (0x7f01c4708130) marked modified after optimization pass octoploid at yandex dot com
2013-11-20  6:49 ` [Bug ipa/59201] " octoploid at yandex dot com
2013-11-20 10:42 ` rguenth at gcc dot gnu.org
2013-11-25  9:10 ` rguenth at gcc dot gnu.org
2013-12-08 10:21 ` octoploid at yandex dot com

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).