This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PR fortran/91496] !GCC$ directives error if mistyped or unknown


Committed to trunk as svn revision 274966, after removing some
accidentally left-over unused variable declarations (copy&paste).
The actual committed version is attached.

Thanks, Paul, for the quick review!

Unless there are strong objections, I'd like to commit this to
9-branch, too, so that this can be used in the 9.3 release.
Applies/regtests cleanly.  Will wait for a week or so.

Harald

On 08/27/19 10:33, Paul Richard Thomas wrote:
> Hi Harald,
>
> This is OK for trunk.
>
> Thanks!
>
> Paul
>
> On Mon, 26 Aug 2019 at 22:13, Harald Anlauf <anlauf@gmx.de> wrote:
>>
>> Dear all,
>>
>> the attached patch adds Fortran support for the following pragmas
>> (loop annotations): IVDEP (ignore vector dependencies), VECTOR, and
>> NOVECTOR.  Furthermore, it downgrades unsupported directives from
>> error to warning (by default, it stays an error with -pedantic),
>> thus fixing the PR.
>>
>> It has no effect on existing code (thus regtested cleanly on
>> x86_64-pc-linux-gnu), but gives users an option for fine-grained
>> control of optimization.  The above pragmas are supported by other
>> compilers (with different sentinels, e.g. !DIR$ for Intel, Cray,
>> sometimes with slightly different keywords).
>>
>> OK for trunk, and backport to 9?
>>
>> Thanks,
>> Harald
>>
>>
>> 2019-08-26  Harald Anlauf  <anlauf@gmx.de>
>>
>>         PR fortran/91496
>>         * gfortran.h: Extend struct gfc_iterator for loop annotations.
>>         * array.c (gfc_copy_iterator): Copy loop annotations by IVDEP,
>>         VECTOR, and NOVECTOR pragmas.
>>         * decl.c (gfc_match_gcc_ivdep, gfc_match_gcc_vector)
>>         (gfc_match_gcc_novector): New matcher functions handling IVDEP,
>>         VECTOR, and NOVECTOR pragmas.
>>         * match.h: Declare prototypes of matcher functions handling IVDEP,
>>         VECTOR, and NOVECTOR pragmas.
>>         * parse.c (decode_gcc_attribute, parse_do_block)
>>         (parse_executable): Decode IVDEP, VECTOR, and NOVECTOR pragmas;
>>         emit warning for unrecognized pragmas instead of error.
>>         * trans-stmt.c (gfc_trans_simple_do, gfc_trans_do): Add code to
>>         emit annotations for IVDEP, VECTOR, and NOVECTOR pragmas.
>>         * gfortran.texi: Document IVDEP, VECTOR, and NOVECTOR pragmas.
>>
>> 2019-08-26  Harald Anlauf  <anlauf@gmx.de>
>>
>>         PR fortran/91496
>>         * gfortran.dg/pr91496.f90: New testcase.
>>
>
>

Attachment: patch-pr91496
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]