From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by sourceware.org (Postfix) with ESMTPS id 2A8EE3973038 for ; Fri, 27 Nov 2020 15:47:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2A8EE3973038 Received: by mail-wm1-x330.google.com with SMTP id z5so1362242wmf.1 for ; Fri, 27 Nov 2020 07:47:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=MXQ1GW7Ym1+2C0BtWRLQUxEhfFQHWumnXM3S+4zk80k=; b=G4LgtcBt2mLyxzDttVhFPIErB0L6bjCcSR88oWAEQy/r+13iYOiPFfaROiwQrBNKno gcrKbGlR14vn0u5T46YB2K6L9fKudNgPylr38nx3cHcwOXLXryCKUH7DTYJmU9B7NY0G gLBOi6dktSLHPM0eHwuyxDHwn6dmjqIBlQxI5fbynJ/YM0QtXT22a9aH4KAFOiw1/5O3 tjns9odTMNptto6+sytM8nJXcGJs7UMbOOkJb+F+ysDHDz4gtJGty5Fj7n0hJAY4DCsl fg7ReNdpUQcXqP2f35vFqLoOouXFfaCA/6LcK/CZxEv/o96x9WIHQWnKnH/1WaM8LzT0 3TlQ== X-Gm-Message-State: AOAM530cGTJiHVS/0rEmhojSWq1gDcgCYcdduZgPAS8Kubx8UNB/8k3q waM+Gd684GRk5C4cmUAwpvgbIa2U/1FJA2PyITv+tyUx X-Google-Smtp-Source: ABdhPJz5JWb5qg/jgcbkU88J8+HMCqmBxdUhN7A5E2QqU+pJWp1Aa6EKDRXUGRpNKypWYqmmXWcYIoBKgBxt6zX5ldw= X-Received: by 2002:a1c:f20e:: with SMTP id s14mr9795498wmc.126.1606492049138; Fri, 27 Nov 2020 07:47:29 -0800 (PST) MIME-Version: 1.0 References: <87ft59e6a2.fsf@euler.schwinge.homeip.net> <87a6vhdzbn.fsf@euler.schwinge.homeip.net> <87r1oj83bx.fsf@dem-tschwing-1.ger.mentorg.com> <877dq6c2e0.fsf@euler.schwinge.homeip.net> In-Reply-To: <877dq6c2e0.fsf@euler.schwinge.homeip.net> From: David Edelsohn Date: Fri, 27 Nov 2020 10:47:17 -0500 Message-ID: Subject: Re: OpenACC 'kernels' testsuite failures To: Thomas Schwinge Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2020 15:47:31 -0000 Hi, Thomas Actually, yes, AIX does allow dereference of a NULL pointer. Thanks, David On Fri, Nov 27, 2020 at 9:15 AM Thomas Schwinge w= rote: > > Hi David! > > On 2020-11-24T15:29:17-0500, David Edelsohn via Gcc-patches wrote: > > On Tue, Nov 24, 2020 at 5:19 AM Thomas Schwinge wrote: > >> On 2020-11-21T10:50:10-0500, David Edelsohn wrote: > >> > I see > >> > > >> > "during GIMPLE pass: omplower" > >> > > >> > message for kernels-decompose-ice-2.c. kernels-decompose-ice-1.c > >> > explicitly prunes that output, but kernels-decompose-ice-2.c does no= t. > >> > Is there a reason that the second testcase does not prune that outpu= t > >> > or can we add it? > >> > >> So, the expectation (as verified by my x86_64-pc-linux-gnu and > >> powerpc64le-unknown-linux-gnu testing) is that > >> 'c-c++-common/goacc/kernels-decompose-ice-1.c' (currently) runs into a= n > >> ICE "during GIMPLE pass: omplower", and > >> 'c-c++-common/goacc/kernels-decompose-ice-2.c' (currently) runs into a= n > >> ICE "during GIMPLE pass: omp_oacc_kernels_decompose". > >> > >> Now, you're reporting that for the latter testcase you're instead also > >> seeing an ICE "during GIMPLE pass: omplower". Can you please show the > >> full ICE report/backtrace, so that we verify that it's not yet another > >> separate issue? > > On gcc119 ('uname -a': "AIX power8-aix 2 7 00F9C1964C00"), I've now also > reproduced the issue. > > >> Maybe the AIX system configuration (ABI?) > >> mandates/causes some slight difference in how front ends set attribute= s > >> such as 'TREE_ADDRESSABLE' on DECLs, which 'omp_oacc_kernels_decompose= ' > >> (currently) is sensitive to (hence the ICEs). > > That's not the case; the input into 'omp_oacc_kernels_decompose' seems to > be exactly the same as on other systems. > > > The error messages reported on AIX are: > > > > Executing on host: /tmp/GCC/gcc/xgcc -B/tmp/GCC/gcc/ /nasfarm/edelsohn/= src/src/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-2.c -fdia= gnostics-plain-output -fopenacc -fopenacc-kernels=3Ddecompose -S -o kerne= ls-decompose-ice-2.s (timeout =3D 300) > > spawn -ignore SIGHUP /tmp/GCC/gcc/xgcc -B/tmp/GCC/gcc/ /nasfarm/edelsoh= n/src/src/gcc/testsuite/c-c++-common/goacc/kernels-decompose-ice-2.c -fdiag= nostics-plain-output -fopenacc -fopenacc-kernels=3Ddecompose -S -o kernels-= decompose-ice-2.s > > during GIMPLE pass: omplower > > /nasfarm/edelsohn/src/src/gcc/testsuite/c-c++-common/goacc/kernels-deco= mpose-ice-2.c: In function 'main': > > /nasfarm/edelsohn/src/src/gcc/testsuite/c-c++-common/goacc/kernels-deco= mpose-ice-2.c:13:9: > > internal compiler error: in lower_omp_target, at omp-low.c:12216 > > That's indeed the location of the 'gcc_assert' responsible for the > 'omplower' ICE, which currently is expected, if we don't run into the > 'omp_oacc_kernels_decompose' ICE first. It's still strange however, why > we're seeing this "for AIX" (not better classified) only: I suppose it > isn't a feature "of AIX" that it can dereference a 'NULL' pointer ;-) -- > which is what seems to be happening here: > > 742 gimple_seq inner_sequence =3D gimple_bind_body (inn= er_bind); > (gdb) next > 743 gcc_assert (gimple_code (inner_sequence) !=3D GIMPL= E_BIND > (gdb) print inner_sequence > $1 =3D (gimple_seq) 0x0 > (gdb) next > 745 gimple_seq_add_seq (&new_body, inner_sequence); > > So we have 'inner_sequence =3D=3D NULL', and yet the 'next' didn't trigge= r a > SIGSEGV in: > > static inline enum gimple_code > gimple_code (const gimple *g) > { > return g->code; > } > > Strange, isn't it? > > > However: this issue should now (indirectly) be fixed via "In > 'gcc/omp-oacc-kernels-decompose.cc:flatten_binds', don't choke on empty > GIMPLE sequence" that I've just pushed to master branch in commit > 4b5726fda653d11f882fb9a112e4cffa12f7ed61. > > > > during GIMPLE pass: omplower > > /nasfarm/edelsohn/src/src/gcc/testsuite/c-c++-common/goacc/kernels-deco= mpose-ice-2.c: In function 'main': > > /nasfarm/edelsohn/src/src/gcc/testsuite/c-c++-common/goacc/kernels-deco= mpose-ice-2.c:13:9: > > internal compiler error: in lower_omp_target, at omp-low.c:12216 > > ranges offset out of range > > That last line actually comes from here: > > libbacktrace/dwarf.c: error_callback (data, "ranges offset out o= f range", 0); > > > Gr=C3=BC=C3=9Fe > Thomas > ----------------- > Mentor Graphics (Deutschland) GmbH, Arnulfstra=C3=9Fe 201, 80634 M=C3=BCn= chen / Germany > Registergericht M=C3=BCnchen HRB 106955, Gesch=C3=A4ftsf=C3=BChrer: Thoma= s Heurung, Alexander Walter