http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55465
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid CC| |burnus at gcc dot gnu.org Depends on| |48858 --- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-11-26 17:40:49 UTC --- (In reply to comment #3) > I'm not sure if this is legal. In any case, here is a reduced test case: The issue is in related to PR 48858; I think the code is valid on most 32bit (e.g. x32-gnu-linux, i386-gnu-linux) systems. I also find the standard a bit confusing, but I think it is supposed to be valid - cf. bug 48858 comment 9. Regarding the specific issue: integer(c_int), value :: value vs. type(c_ptr), value :: value On a 64 bit system it is invalid as "int" ("integer(c_int),value") is a 32 bit value and "void*" ("type(c_ptr),value") is a 64 bit pointer. If "value" is supposed to be a pointer address, it should use "integer(c_intptr_t)". I think that's the case as I find "SQLPOINTER ValuePtr" in the references to SQLSetEnvAttr.