From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16621 invoked by alias); 23 Jan 2018 16:02:40 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 16570 invoked by uid 89); 23 Jan 2018 16:02:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=H*r:sk:gdb@sou, sk:DW_AT_u, sk:dw_at_u, H*r:sk:static. X-HELO: mail-wm0-f68.google.com Received: from mail-wm0-f68.google.com (HELO mail-wm0-f68.google.com) (74.125.82.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 23 Jan 2018 16:02:37 +0000 Received: by mail-wm0-f68.google.com with SMTP id v71so2924608wmv.2 for ; Tue, 23 Jan 2018 08:02:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=niNgvkNkprw3SUgOYbZ4++2WrMBJ8bz6ppNj9ZTFJWQ=; b=rv+VaHZ97coiq/zfQkByIhSyge3sViIHbcq3vVn/ulF2PuIeJzyMpf7ys+ei2pwox/ ABnVprFHhp12S6zAiPukqQZPeRzk0IcBPZ0XvV1jr7SyUc8sQMIm1yN6jO8vTu+JgHHz LP2V8rgXVTtu8F53P8TQqIfjRByO326pnD2oCmX6LoWRHNVmTHOyb/KH4dIRo8GPeZtK KF96Py50XgTjW3bgX9rqNVHrXOXyoDsxvlTKYVYzY9Gyq+xpvLt3N+k+Y6YvNtna8n3M 0Jpq+Zc1jr65cmP1ZNPaxu3NPUXBbKDSDMfgJTVsoNo1Rc0gZaWpDntdJnLPsuS3LjrV BGaA== X-Gm-Message-State: AKwxyteP3ygBsiZPy5hca/KQZ6jCKtzLmeItNfEkhH+H84NbQTob+NYV FCs9g/a1Le4jEgFYs/dk3Nsw5A== X-Google-Smtp-Source: AH8x224G1ZJz4KJf7roq2j24ZTW6EqG4vORy9P0cZj6fUawNIFFe89QRcxTZKyA3BxwUiczz46c8iQ== X-Received: by 10.28.168.8 with SMTP id r8mr2497339wme.157.1516723354609; Tue, 23 Jan 2018 08:02:34 -0800 (PST) Received: from E107787-LIN (static.42.136.251.148.clients.your-server.de. [148.251.136.42]) by smtp.gmail.com with ESMTPSA id a139sm10138801wme.1.2018.01.23.08.02.33 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 23 Jan 2018 08:02:34 -0800 (PST) From: Yao Qi To: fortran@gcc.gnu.org, gcc@gcc.gnu.org Cc: gdb@sourceware.org Subject: Different dynamical array debug info 7.2 vs. 8.0 Date: Tue, 23 Jan 2018 16:02:00 -0000 Message-ID: <86d120ef6x.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00016.txt.bz2 Hi, I observed that gfortran 7.2 and 8.0 generate different debug info for dynamical array. Here is a case simplified from gdb test case gdb.fortran/vla-datatypes.f90 $ cat vla-datatypes.f90=20 program vla_primitives integer, allocatable :: intvla(:, :, :) logical :: l allocate (intvla (11,22,33)) l =3D allocated(intvla) ! vlas-allocated intvla(:,:,:) =3D 1 intvla(5,5,5) =3D 42 ! vlas-initialized end program vla_primitives In gcc 8.0, the intvla debug info is, <2>: Abbrev Number: 10 (DW_TAG_variable) DW_AT_name : (indirect string, offset: 0xcb): intvla DW_AT_decl_file : 1 DW_AT_decl_line : 2 DW_AT_type : <0x127> DW_AT_location : 3 byte block: 91 e0 7e (DW_OP_fbreg: -160) <1><127>: Abbrev Number: 14 (DW_TAG_array_type) <128> DW_AT_ordering : 1 (column major) <129> DW_AT_data_location: 4 byte block: 97 23 8 6 (DW_OP_push= _object_address; DW_OP_plus_uconst: 8; DW_OP_deref) <12e> DW_AT_allocated : 6 byte block: 97 23 8 6 30 2e (DW_OP_push= _object_address; DW_OP_plus_uconst: 8; DW_OP_deref; DW_OP_lit0; DW_OP_ne) <135> DW_AT_type : <0x7b> <139> DW_AT_sibling : <0x174> <2><13d>: Abbrev Number: 15 (DW_TAG_subrange_type) <13e> DW_AT_lower_bound : 4 byte block: 97 23 28 6 (DW_OP_push= _object_address; DW_OP_plus_uconst: 40; DW_OP_deref) <143> DW_AT_upper_bound : 4 byte block: 97 23 30 6 (DW_OP_push= _object_address; DW_OP_plus_uconst: 48; DW_OP_deref) <148> DW_AT_byte_stride : 6 byte block: 97 23 20 6 34 1e (DW_OP_push= _object_address; DW_OP_plus_uconst: 32; DW_OP_deref; DW_OP_lit4; DW_OP_mul) <2><14f>: Abbrev Number: 15 (DW_TAG_subrange_type) <150> DW_AT_lower_bound : 4 byte block: 97 23 40 6 (DW_OP_push= _object_address; DW_OP_plus_uconst: 64; DW_OP_deref) <155> DW_AT_upper_bound : 4 byte block: 97 23 48 6 (DW_OP_push= _object_address; DW_OP_plus_uconst: 72; DW_OP_deref) <15a> DW_AT_byte_stride : 6 byte block: 97 23 38 6 34 1e (DW_OP_push= _object_address; DW_OP_plus_uconst: 56; DW_OP_deref; DW_OP_lit4; DW_OP_mul) <2><161>: Abbrev Number: 15 (DW_TAG_subrange_type) <162> DW_AT_lower_bound : 4 byte block: 97 23 58 6 (DW_OP_push= _object_address; DW_OP_plus_uconst: 88; DW_OP_deref) <167> DW_AT_upper_bound : 4 byte block: 97 23 60 6 (DW_OP_push= _object_address; DW_OP_plus_uconst: 96; DW_OP_deref) <16c> DW_AT_byte_stride : 6 byte block: 97 23 50 6 34 1e (DW_OP_push= _object_address; DW_OP_plus_uconst: 80; DW_OP_deref; DW_OP_lit4; DW_OP_mul) <2><173>: Abbrev Number: 0 In gcc 7.2, it is, <2>: Abbrev Number: 10 (DW_TAG_variable) DW_AT_name : (indirect string, offset: 0x12): intvla DW_AT_decl_file : 1 DW_AT_decl_line : 2 DW_AT_type : <0x127> DW_AT_location : 3 byte block: 91 e0 7e (DW_OP_fbreg: -160) <1><127>: Abbrev Number: 14 (DW_TAG_array_type) <128> DW_AT_ordering : 1 (column major) <129> DW_AT_data_location: 2 byte block: 97 6 (DW_OP_push_object_= address; DW_OP_deref) <12c> DW_AT_allocated : 4 byte block: 97 6 30 2e (DW_OP_push= _object_address; DW_OP_deref; DW_OP_lit0; DW_OP_ne) <131> DW_AT_type : <0x7b> <135> DW_AT_sibling : <0x170> <2><139>: Abbrev Number: 15 (DW_TAG_subrange_type) <13a> DW_AT_lower_bound : 4 byte block: 97 23 20 6 (DW_OP_push= _object_address; DW_OP_plus_uconst: 32; DW_OP_deref) <13f> DW_AT_upper_bound : 4 byte block: 97 23 28 6 (DW_OP_push= _object_address; DW_OP_plus_uconst: 40; DW_OP_deref) <144> DW_AT_byte_stride : 6 byte block: 97 23 18 6 34 1e (DW_OP_push= _object_address; DW_OP_plus_uconst: 24; DW_OP_deref; DW_OP_lit4; DW_OP_mul) <2><14b>: Abbrev Number: 15 (DW_TAG_subrange_type) <14c> DW_AT_lower_bound : 4 byte block: 97 23 38 6 (DW_OP_push= _object_address; DW_OP_plus_uconst: 56; DW_OP_deref) <151> DW_AT_upper_bound : 4 byte block: 97 23 40 6 (DW_OP_push= _object_address; DW_OP_plus_uconst: 64; DW_OP_deref) <156> DW_AT_byte_stride : 6 byte block: 97 23 30 6 34 1e (DW_OP_push= _object_address; DW_OP_plus_uconst: 48; DW_OP_deref; DW_OP_lit4; DW_OP_mul) <2><15d>: Abbrev Number: 15 (DW_TAG_subrange_type) <15e> DW_AT_lower_bound : 4 byte block: 97 23 50 6 (DW_OP_push= _object_address; DW_OP_plus_uconst: 80; DW_OP_deref) <163> DW_AT_upper_bound : 4 byte block: 97 23 58 6 (DW_OP_push= _object_address; DW_OP_plus_uconst: 88; DW_OP_deref) <168> DW_AT_byte_stride : 6 byte block: 97 23 48 6 34 1e (DW_OP_push= _object_address; DW_OP_plus_uconst: 72; DW_OP_deref; DW_OP_lit4; DW_OP_mul) <2><16f>: Abbrev Number: Attributes DW_AT_data_location and DW_AT_allocated are different. There is an extra "DW_OP_plus_uconst: 8" generated by gcc 8.0. Is it intended or expected? gfortran 8.0 causes many gdb.fotran vla-related tests fail, but gfortran 7.2 doesn't. That is why I took a look at the debug information. --=20 Yao (=E9=BD=90=E5=B0=A7)