[Bug fortran/41034] [4.5 Regression] Wrongly rejected proc pointer assignment with CDECL (compiler-directive_1.f90)
burnus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue Aug 11 19:06:00 GMT 2009
------- Comment #1 from burnus at gcc dot gnu dot org 2009-08-11 19:06 -------
The following patch is needed to initialize the variables; however, it does not
solve the actual problem - here, we only make the checks tighter.
For some reason, the LHS seems to be 0 all the time while the RHS gets a random
value. In gfc_add_ext_attribute, everything seems to be still OK.
--- expr.c (revision 150651)
+++ expr.c (working copy)
@@ -3195,2 +3195 @@ gfc_check_pointer_assign (gfc_expr *lval
- symbol_attribute cdecl, stdcall, fastcall;
- unsigned calls;
+ symbol_attribute calls;
@@ -3198,4 +3197,4 @@ gfc_check_pointer_assign (gfc_expr *lval
- gfc_add_ext_attribute (&cdecl, EXT_ATTR_CDECL, NULL);
- gfc_add_ext_attribute (&stdcall, EXT_ATTR_STDCALL, NULL);
- gfc_add_ext_attribute (&fastcall, EXT_ATTR_FASTCALL, NULL);
- calls = cdecl.ext_attr | stdcall.ext_attr | fastcall.ext_attr;
+ calls.ext_attr = 0;
+ gfc_add_ext_attribute (&calls, EXT_ATTR_CDECL, NULL);
+ gfc_add_ext_attribute (&calls, EXT_ATTR_STDCALL, NULL);
+ gfc_add_ext_attribute (&calls, EXT_ATTR_FASTCALL, NULL);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41034
More information about the Gcc-bugs
mailing list