2018-06-10 9:02 GMT+02:00 Janus Weil <ja...@gcc.gnu.org>: > Hi Thomas, > >> I like what the patch does. However, I have one concern. >> >>> * decl.c (match_attr_spec): Synchronize the DECL_* enum values with >>> the >>> INTENT_* values from the enum 'sym_intent'. >> >> >> This part >> >> + { GFC_DECL_BEGIN = 0, DECL_ALLOCATABLE = GFC_DECL_BEGIN, >> + DECL_IN = INTENT_IN, DECL_OUT = INTENT_OUT, DECL_INOUT = INTENT_INOUT, >> + DECL_DIMENSION, DECL_EXTERNAL, >> + DECL_INTRINSIC, DECL_OPTIONAL, >> >> brings a dependency of the values of sym_intent into this enum. >> >> I know that the order of sym_intent is not likely to change, but I would >> still prefer if you could add a comment to the sym_intent definition in >> gfortran.h noting that INTENT_IN cannot be zero, and add a >> >> gcc_assert (INTENT_IN > 0); >> >> somewhere (which will be optimized away) with an explanatory comment. > > good point. I have added the assert and some comments. Updated patch attached. > > >> OK with that change. > > Thanks. I'm doing another regtest now and will commit if that goes well ...
No failures observed. Committed as r261386. Cheers, Janus