From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16889 invoked by alias); 3 Feb 2011 18:24:12 -0000 Received: (qmail 16862 invoked by uid 22791); 3 Feb 2011 18:24:11 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from nm14-vm0.bullet.mail.ukl.yahoo.com (HELO nm14-vm0.bullet.mail.ukl.yahoo.com) (217.146.183.250) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Thu, 03 Feb 2011 18:24:05 +0000 Received: from [217.146.183.216] by nm14.bullet.mail.ukl.yahoo.com with NNFMP; 03 Feb 2011 18:24:03 -0000 Received: from [217.146.183.34] by tm9.bullet.mail.ukl.yahoo.com with NNFMP; 03 Feb 2011 18:24:03 -0000 Received: from [127.0.0.1] by omp1023.mail.ukl.yahoo.com with NNFMP; 03 Feb 2011 18:24:03 -0000 Received: (qmail 98635 invoked by uid 60001); 3 Feb 2011 18:24:02 -0000 Message-ID: <710437.94578.qm@web28515.mail.ukl.yahoo.com> Received: from [132.166.132.113] by web28515.mail.ukl.yahoo.com via HTTP; Thu, 03 Feb 2011 18:24:02 GMT References: <627793.44296.qm@web28514.mail.ukl.yahoo.com> <4D48375E.1020104@andihellmund.com> Date: Thu, 03 Feb 2011 18:24:00 -0000 From: charfi asma Subject: Re : [gcc front end] add options To: Andi Hellmund Cc: gcc-help@gcc.gnu.org In-Reply-To: <4D48375E.1020104@andihellmund.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-02/txt/msg00076.txt.bz2 ----- Message d'origine ---- De : Andi Hellmund =C3=80 : charfi asma Cc : gcc-help@gcc.gnu.org Envoy=C3=A9 le : Mar 1 f=C3=A9vrier 2011, 17h 39min 58s Objet : Re: [gcc front end] add options On 2/1/2011 4:43 PM, charfi asma wrote: > Hello, > > I built a new gcc front end > I would like to use the -fopenmp options when compiling my source file > I could use the C front end options like -S -fdump-tree-all -O*, .... but= when=20 >I > use -fopenmp I get this error: > > uml1: warning: command line option =E2=80=98-fopenmp=E2=80=99 is valid for > C/C++/Fortran/ObjC/ObjC++ but not for [enabled by default] > > should I modify my lang-specs.h ? If yes what kind of modification ? > > here is its content: > > {".uml", "@uml", 0, 1, 0}, > {"@uml", "uml1 %i %(invoke_as)", 0, 1, 0}, > {"@uml", "uml1 %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}", > 0, 1, 0}, > > > thank you very much > > Asma >=20=20=20=20 Hey Asma, I think adding -fopenmp to lang-specs.h wouldn't help since the error=20 message comes from uml1 (compiler proper). And by the way, the -f*=20 options are usually already included in %{cc1_options}. The original=20 definition of the -fopenmp option is available in c.opt (in c-family=20 directory of 4.6), but please have a look at the lang.opt file of the=20 Fortran front-end for details. This is how this is implemented there: fopenmp Fortran ; Documented in C This then allows the Fortran front-end to "reuse" the definition of the=20 C (family) front-ends. Best regards, Andre-Marcel Hello, thank you Philip and Andi for your help. I added the fopenmp options to my lang.opt file as fortran fe does, but I a= lways=20 get the same warning expect that my fe language name is added to the list o= f fe=20 that enable the use of fopenmp uml1: warning: command line option =E2=80=98-fopenmp=E2=80=99 is valid for= =20 C/C++/Fortran/ObjC/ObjC++/uml but not for [enabled by default] yes the error in my front end comes from the uml1.c because I tried to buil= d the=20 Generic form correspending to #pragma omp parallel I get the gimplified expression as provided by c++ front end here is my gimple=20 main () gimple_bind < D.28; struct MyClass x; gimple_omp_parallel < BODY < gimple_bind < gimple_call gimple_call > > CLAUSES < shared(x) >, NULL, NULL > gimple_assign gimple_return > MyOperation2 (struct MyClass * this) gimple_bind < gimple_assign MyAttribute2, 15, NULL> gimple_return > MyOperation1 (struct MyClass * this) gimple_bind < gimple_assign MyAttribute1, 10, NULL> gimple_return > but it does not contain the built-in function (as gimple generated from c++= fe) (struct .omp_data_s.0 * .omp_data_i) { struct MyClass c [value-expr: *.omp_data_i->c]; struct MyClass * D.1788; struct MyClass * D.1787; struct MyClass * D.1786; struct MyClass * D.1785; : : gimple_assign c, NULL> .... } one of the reason is that my flag_openmp is always null, even if I specify= =20 -fopenmp while compiling. i,e: when my front end calls the execute_lower_omp(void) it does nothing execute_lower_omp (void) { gimple_seq body; /* This pass always runs, to provide PROP_gimple_lomp. But there is nothing to do unless -fopenmp is given. */ if (flag_openmp =3D=3D 0) return 0; .... } any idea to change fe flag_openmp value ?=20=20 thank you very much. Asma