public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/38716] Undocumented __attribute__((optimize)) behaviour when the attribute specifies no optimisation level
Date: Tue, 23 Dec 2014 21:07:00 -0000	[thread overview]
Message-ID: <bug-38716-4-ZfTG7HPDm4@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-38716-4@http.gcc.gnu.org/bugzilla/>

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

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

--- Comment #1 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Probably a dup of PR63401
>From gcc-bugs-return-471671-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Dec 23 21:13:56 2014
Return-Path: <gcc-bugs-return-471671-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 30316 invoked by alias); 23 Dec 2014 21:13:56 -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 30300 invoked by uid 48); 23 Dec 2014 21:13:52 -0000
From: "patnel97269-gfortran at yahoo dot fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/64397] New: memory allocation failed with parenthesis
Date: Tue, 23 Dec 2014 21:13: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: 4.9.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: patnel97269-gfortran at yahoo dot fr
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-64397-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: 2014-12/txt/msg02678.txt.bz2
Content-length: 1426

https://gcc.gnu.org/bugzilla/show_bug.cgi?idd397

            Bug ID: 64397
           Summary: memory allocation failed with parenthesis
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: patnel97269-gfortran at yahoo dot fr

Hi all,

I want to report a bug which i describe orignially here,
https://gcc.gnu.org/ml/fortran/2014-12/msg00117.html .

The expression (a+b) works well, while ((a)+(b)) triggers a memory allocation
issue. And its works fine, if there is no allocatable components in the type.

Janus Weil worked out a reduce test case below, and can  reproduce the segfault
with various versions of gfortran (4.7, 4.8, 4.9 and trunk) :

module num

  type :: my_integer
    real, allocatable :: x(:)
  contains
    procedure :: ass
    generic :: assignment(=) => ass
  end type

contains

  subroutine ass(a,b)
    class(my_integer), intent(out) :: a
    class(my_integer), intent(in) :: b
    select type (b)
    type is (my_integer)
      allocate(a%x(size(b%x)))
      a%x = b%x
    end select
    print *,'called ass'
  end subroutine

end module

program main
  use num
  type(my_integer) :: a, c
  a=my_integer([1])
  write (*,*) "C: ",c%x
  c = a
  write (*,*) "C: ",c%x
  c = (a)
  write (*,*) "C: ",c%x
end

Thanks
Pat.


  parent reply	other threads:[~2014-12-23 21:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-38716-4@http.gcc.gnu.org/bugzilla/>
2014-09-29 18:50 ` fxcoudert at gcc dot gnu.org
2014-12-23 21:07 ` manu at gcc dot gnu.org [this message]
2024-03-10  1:31 ` pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-38716-4-ZfTG7HPDm4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).