From patchwork Wed Oct 14 07:34:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Huber X-Patchwork-Id: 530069 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 108201402B7 for ; Wed, 14 Oct 2015 18:35:00 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=YNT/otCG; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; q=dns; s= default; b=YAVIUDOS2XNgk50k0g4EiZ+TW4yb9kc9FKsROxa/oowdR+QgIBN+x iBF+mPc1ahuNTTzQXVOfMY829uYfHL8jCLyrEnRewLPkyNBmvYeW+f2UjEUxubwK KBSIZQZ+nLX/zD/1EhAirLURBCHgq+D35TLMfHyUVWH8oWrzfF4zWA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=default; bh=GQEuIckmgNmMwyFpFdSR8LJzREs=; b=YNT/otCGbm6T8TGxlFpUeNoWmaJJ fMAV04dqxdgAPpYize5OhpqBlm7Wt9IFrJ2HKd0BJ3ohp/WtBxngOiqad7uTCZaz C8nAcF8nywMNGvBb06A35NBuBzi+THGTohvckEC9iw0CHMuWr7+SdyscReJ00Scv vfq9KTM2lI6wqjc= Received: (qmail 119492 invoked by alias); 14 Oct 2015 07:34:54 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 119480 invoked by uid 89); 14 Oct 2015 07:34:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: Yes, score=5.2 required=5.0 tests=AWL, BAYES_50, FOREIGN_BODY, KAM_LAZY_DOMAIN_SECURITY, RDNS_DYNAMIC, T_FILL_THIS_FORM_SHORT autolearn=no version=3.3.2 X-HELO: mail.embedded-brains.de Received: from host-82-135-62-35.customer.m-online.net (HELO mail.embedded-brains.de) (82.135.62.35) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 14 Oct 2015 07:34:52 +0000 Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id F394C2A097C; Wed, 14 Oct 2015 09:35:08 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 5yLk5QS6Zifc; Wed, 14 Oct 2015 09:35:08 +0200 (CEST) Received: from localhost (localhost.localhost [127.0.0.1]) by mail.embedded-brains.de (Postfix) with ESMTP id 7E6D42A181A; Wed, 14 Oct 2015 09:35:08 +0200 (CEST) Received: from mail.embedded-brains.de ([127.0.0.1]) by localhost (zimbra.eb.localhost [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id wNPCQX9mOsu7; Wed, 14 Oct 2015 09:35:08 +0200 (CEST) Received: from [192.168.96.129] (unknown [192.168.96.129]) by mail.embedded-brains.de (Postfix) with ESMTPSA id 61DDF2A097C; Wed, 14 Oct 2015 09:35:08 +0200 (CEST) Subject: Re: Merge from gomp-4_1-branch to trunk To: Jakub Jelinek , gcc-patches@gcc.gnu.org References: <20151013191214.GL478@tucnak.redhat.com> From: Sebastian Huber Message-ID: <561E0598.6030003@embedded-brains.de> Date: Wed, 14 Oct 2015 09:34:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151013191214.GL478@tucnak.redhat.com> X-IsSubscribed: yes Hello, I get now the following error: libtool: compile: /scratch/git-build/b-gcc-git-arm-rtems4.12/./gcc/xgcc -B/scratch/git-build/b-gcc-git-arm-rtems4.12/./gcc/ -nostdinc -B/scratch/git-build/b-gcc-git-arm-rtems4.12/arm-rtems4.12/newlib/ -isystem /scratch/git-build/b-gcc-git-arm-rtems4.12/arm-rtems4.12/newlib/targ-include -isystem /home/EB/sebastian_h/archive/gcc-git/newlib/libc/include -B/opt/rtems-4.12/arm-rtems4.12/bin/ -B/opt/rtems-4.12/arm-rtems4.12/lib/ -isystem /opt/rtems-4.12/arm-rtems4.12/include -isystem /opt/rtems-4.12/arm-rtems4.12/sys-include -DHAVE_CONFIG_H -I. -I/home/EB/sebastian_h/archive/gcc-git/libgomp -I/home/EB/sebastian_h/archive/gcc-git/libgomp/config/rtems -I/home/EB/sebastian_h/archive/gcc-git/libgomp/config/posix -I/home/EB/sebastian_h/archive/gcc-git/libgomp -I/home/EB/sebastian_h/archive/gcc-git/libgomp/../include -Wall -Werror -g -O2 -MT fortran.lo -MD -MP -MF .deps/fortran.Tpo -c /home/EB/sebastian_h/archive/gcc-git/libgomp/fortran.c -o fortran.o /home/EB/sebastian_h/archive/gcc-git/libgomp/fortran.c: In function 'omp_get_place_proc_ids_': /home/EB/sebastian_h/archive/gcc-git/libgomp/fortran.c:484:39: error: passing argument 2 of 'omp_get_place_proc_ids' from incompatible pointer type [-Werror=incompatible-pointer-types] omp_get_place_proc_ids (*place_num, ids); ^ In file included from /home/EB/sebastian_h/archive/gcc-git/libgomp/fortran.c:28:0: /home/EB/sebastian_h/archive/gcc-git/libgomp/fortran.c:73:18: note: expected 'int *' but argument is of type 'int32_t * {aka long int *}' ialias_redirect (omp_get_place_proc_ids) ^ /home/EB/sebastian_h/archive/gcc-git/libgomp/libgomp.h:1011:24: note: in definition of macro 'ialias_redirect' extern __typeof (fn) fn __asm__ (ialias_ulp "gomp_ialias_" #fn) attribute_hidden; ^ /home/EB/sebastian_h/archive/gcc-git/libgomp/fortran.c: In function 'omp_get_partition_place_nums_': /home/EB/sebastian_h/archive/gcc-git/libgomp/fortran.c:508:33: error: passing argument 1 of 'omp_get_partition_place_nums' from incompatible pointer type [-Werror=incompatible-pointer-types] omp_get_partition_place_nums (place_nums); ^ In file included from /home/EB/sebastian_h/archive/gcc-git/libgomp/fortran.c:28:0: /home/EB/sebastian_h/archive/gcc-git/libgomp/fortran.c:76:18: note: expected 'int *' but argument is of type 'int32_t * {aka long int *}' ialias_redirect (omp_get_partition_place_nums) ^ /home/EB/sebastian_h/archive/gcc-git/libgomp/libgomp.h:1011:24: note: in definition of macro 'ialias_redirect' extern __typeof (fn) fn __asm__ (ialias_ulp "gomp_ialias_" #fn) attribute_hidden; We have for example (libgomp/omp_lib.f90.in): subroutine omp_get_place_proc_ids (place_num, ids) integer (4), intent(in) :: place_num integer (4), intent(out) :: ids(*) end subroutine omp_get_place_proc_ids So this interface is different to (libgomp/omp.h.in): extern void omp_get_place_proc_ids (int, int *) __GOMP_NOTHROW; The following patch fixes the problem, but I am not sure if this is really the best way to address this issue: diff --git a/libgomp/fortran.c b/libgomp/fortran.c index ceff9ac..44aaf92 100644 --- a/libgomp/fortran.c +++ b/libgomp/fortran.c @@ -481,7 +481,9 @@ omp_get_place_num_procs_8_ (const int64_t *place_num) void omp_get_place_proc_ids_ (const int32_t *place_num, int32_t *ids) { - omp_get_place_proc_ids (*place_num, ids); + int int_ids; + omp_get_place_proc_ids (*place_num, &int_ids); + *ids = int_ids; } void @@ -505,7 +507,9 @@ omp_get_partition_num_places_ (void) void omp_get_partition_place_nums_ (int32_t *place_nums) { - omp_get_partition_place_nums (place_nums); + int int_place_nums; + omp_get_partition_place_nums (&int_place_nums); + *place_nums = int_place_nums; } void