From patchwork Fri Apr 5 13:10:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 234126 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id EBBA82C00BE for ; Sat, 6 Apr 2013 00:10:44 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:reply-to:mime-version:content-type; q=dns; s=default; b=pZTaiZIxBiwG9f1lBM/wRvanCJRo+qsKu0s5L0Hp19p WpdSpNqosB4+5dFAYi2bpaR7JX3LhJT7eBPkeYRpPfJL6+085tJ8m2jfcVGJve+5 2dTCQi8R8+mnCQVrr8i2RP9scMUg76NIoeix9GCttbtesPGveacevowVak4BBX4E = 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:date :from:to:subject:message-id:reply-to:mime-version:content-type; s=default; bh=IKedZ8oSCm1PQUqRHzcfFwn2Uw4=; b=ijdwaRz7JiT61s2m4 OgyzZqToPhKXUAWeljPkWwxSddijCdLpC0+kdRx3Ip5OxnltSXgA4YwPR4xHI9wV SKrlFnw0iBuzI1X3UBwxqKgVGQDktGEw41YO0pmBbyFpGuEQYbA7btvmGTJv/3Mt FNyFD8PX7V1p99ZWa+ygen3c9Q= Received: (qmail 17150 invoked by alias); 5 Apr 2013 13:10:35 -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 17141 invoked by uid 89); 5 Apr 2013 13:10:34 -0000 X-Spam-SWARE-Status: No, score=-6.4 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W autolearn=ham version=3.3.1 Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 05 Apr 2013 13:10:31 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UO6PM-000158-A5 for gcc-patches@gcc.gnu.org; Fri, 05 Apr 2013 09:10:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44639) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UO6PM-00014q-2i for gcc-patches@gcc.gnu.org; Fri, 05 Apr 2013 09:10:20 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r35DAA2a002898 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 5 Apr 2013 09:10:11 -0400 Received: from zalov.cz (vpn1-5-203.ams2.redhat.com [10.36.5.203]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r35DA6Rd010772 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 5 Apr 2013 09:10:09 -0400 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.cz (8.14.5/8.14.5) with ESMTP id r35DA5Ls023436 for ; Fri, 5 Apr 2013 15:10:05 +0200 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id r35DA4e6023435 for gcc-patches@gcc.gnu.org; Fri, 5 Apr 2013 15:10:04 +0200 Date: Fri, 5 Apr 2013 15:10:03 +0200 From: Jakub Jelinek To: gcc-patches@gcc.gnu.org Subject: [gomp4] Disallow class iterators in omp simd and omp for simd loops Message-ID: <20130405131003.GE20334@tucnak.redhat.com> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Hi! I've missed that OpenMP 4.0 rc2 in 2.6's last restriction mentions: "For C++, in the simd construct the only random access iterator type that are for var are pointer types." The following patch implements that restriction (no testcase yet until simd is fully supported), committed to branch. 2013-04-05 Jakub Jelinek * semantics.c (finish_omp_for): Disallow class iterators for OMP_SIMD and OMP_FOR_SIMD loops. Jakub --- gcc/cp/semantics.c.jj 2013-03-27 13:01:09.000000000 +0100 +++ gcc/cp/semantics.c 2013-04-05 14:35:07.967622671 +0200 @@ -5090,6 +5090,13 @@ finish_omp_for (location_t locus, enum t if (CLASS_TYPE_P (TREE_TYPE (decl))) { + if (code == OMP_SIMD || code == OMP_FOR_SIMD) + { + error_at (elocus, "%<#pragma omp%s simd%> used with class " + "iteration variable %qE", + code == OMP_FOR_SIMD ? " for" : "", decl); + return NULL; + } if (handle_omp_for_class_iterator (i, locus, declv, initv, condv, incrv, &body, &pre_body, clauses)) return NULL;