------- Comment #1 from dfranke at gcc dot gnu dot org 2007-06-15 20:54 ------- In this code, the symbol's attribute SAVE is never set, i.e. neither symbol.c(gfc_add_save) is called, nor is the attribute set manually:
integer :: a = 1 end Thus, testing for sym->attr.save fails in resolve.c:6431 (if threadprivate is set as shown above): if (sym->attr.threadprivate && !sym->attr.save && (!sym->attr.in_common && sym->module == NULL && (sym->ns->proc_name == NULL || sym->ns->proc_name->attr.flavor != FL_MODULE))) gfc_error ("Threadprivate at %L isn't SAVEd", &sym->declared_at); If the SAVE parameter is explicitely specified, the attribute is set. Intel and SUN compilers accept the reporter's testcase without problems. -- dfranke at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dfranke at gcc dot gnu dot | |org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 GCC build triplet|x86_64-suse-linux | GCC host triplet|x86_64-suse-linux | GCC target triplet|x86_64-suse-linux | Last reconfirmed|0000-00-00 00:00:00 |2007-06-15 20:54:06 date| | Summary|GFORTRAN MSG "ERROR: |incorrect error: |THREADPRIVATE AT (1) ISN'T |Threadprivate isn't SAVEd |SAVED" INCORRECT IN MAIN PGM|(implicit save attribute | |undefined) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32359