This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/67567] resolve.c: gfc_error called with iface->module == NULL
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 14 Sep 2015 10:14:50 +0000
- Subject: [Bug fortran/67567] resolve.c: gfc_error called with iface->module == NULL
- Auto-submitted: auto-generated
- References: <bug-67567-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67567
Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-09-14
CC| |manu at gcc dot gnu.org
Summary|pretty-print.h sanitizer |resolve.c: gfc_error called
|detects NULL pointer passed |with iface->module == NULL
|to obstack_grow |
Ever confirmed|0 |1
--- Comment #1 from Manuel LÃpez-IbÃÃez <manu at gcc dot gnu.org> ---
(In reply to Vittorio Zecca from comment #0)
> but I believe it best to fix it by prefixing the statement with "if(length)"
That would hide the real bug, which is that:
gfc_error ("%s between the MODULE PROCEDURE declaration "
"in module %s and the declaration at %L in "
"SUBMODULE %s", errmsg, iface->module,
&sym->declared_at, sym->ns->proc_name->name);
is called with iface->module == NULL.
(I think you are doing a nice job at finding and reporting all these sanitizer
issues, but it would be better to figure out the real causes in order to
implement the best solution, and for that you need to master GDB. Otherwise,
developers eager to close as many issues as fast as possible may end up slowing
down the compiler with unnecessary checks while hiding real bugs).