From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25732 invoked by alias); 22 Mar 2014 19:17:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 25699 invoked by uid 48); 22 Mar 2014 19:17:43 -0000 From: "dominiq at lps dot ens.fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/57079] [Fortran-dev] version/type/attribute fields not set with CLASS components Date: Sat, 22 Mar 2014 19:17:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Version: fortran-dev X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: dominiq at lps dot ens.fr X-Bugzilla-Status: WAITING 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_status cf_reconfirmed_on everconfirmed Message-ID: In-Reply-To: References: 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-03/txt/msg02046.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57079 Dominique d'Humieres changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Last reconfirmed| |2014-03-22 Ever confirmed|0 |1 --- Comment #2 from Dominique d'Humieres --- What is the problem with this pr? The difference between the dump with trunk (r208766) and the dev branch (r208422) is --- pr57079.f90.003t.original 2014-03-22 20:11:30.000000000 +0100 +++ pr57079.f90_dev.003t.original 2014-03-22 20:10:59.000000000 +0100 @@ -14,28 +14,38 @@ foo () try { x = 0B; - if (x != 0B) + if ((logical(kind=4)) __builtin_expect ((integer(kind=8)) (x != 0B), 0)) { _gfortran_runtime_error_at (&"At line 10 of file pr57079.f90"[1]{lb: 1 sz: 1}, &"Attempting to allocate already allocated variable \'%s\'"[1]{lb: 1 sz: 1}, &"x"[1]{lb: 1 sz: 1}); } else { - x = (struct t *) __builtin_malloc (112); - if (x == 0B) + x = (struct t *) __builtin_malloc (128); + if ((logical(kind=4)) __builtin_expect ((integer(kind=8)) (x == 0B), 0)) { _gfortran_os_error (&"Allocation would exceed memory limit"[1]{lb: 1 sz: 1}); } } - x->x.data = 0B; - x->y._data.data = 0B; + x->x.base_addr = 0B; + x->x.elem_len = 4; + x->x.version = 1; + x->x.rank = 1; + x->x.type = 1025; + x->x.attribute = 2; + x->y._data.base_addr = 0B; + x->y._data.elem_len = 0; + x->y._data.version = 1; + x->y._data.rank = 1; + x->y._data.type = -1; + x->y._data.attribute = 1; { struct t t.0; if (x != 0B) goto L.1; - x = (struct t *) __builtin_calloc (1, 112); + x = (struct t *) __builtin_calloc (1, 128); L.1:; - t.0.x.data = 0B; - t.0.y._data.data = 0B; + t.0.x.base_addr = 0B; + t.0.y._data.base_addr = 0B; t.0.y._vptr = (struct __vtype_foo_T2 * {ref-all}) &__vtab_foo_T2; t.0.z = 55; *x = t.0; @@ -45,20 +55,20 @@ foo () { if (x != 0B) { - if (x->x.data != 0B) + if (x->x.base_addr != 0B) { - __builtin_free ((void *) x->x.data); + __builtin_free ((void *) x->x.base_addr); } - x->x.data = 0B; - if ((struct t2[0:] * restrict) x->y._data.data != 0B && x->y._vptr->_final != 0B) + x->x.base_addr = 0B; + if ((struct t2[0:] * restrict) x->y._data.base_addr != 0B && x->y._vptr->_final != 0B) { x->y._vptr->_final (&x->y._data, (integer(kind=8)) x->y._vptr->_size, 1); } - if (x->y._data.data != 0B) + if (x->y._data.base_addr != 0B) { - __builtin_free ((void *) x->y._data.data); + __builtin_free ((void *) x->y._data.base_addr); } - x->y._data.data = 0B; + x->y._data.base_addr = 0B; __builtin_free ((void *) x); } }