public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jvdelisle at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/45793] [4.6 Regressions] Numerous test-suite failures Date: Sun, 26 Sep 2010 10:27:00 -0000 [thread overview] Message-ID: <20100926102700.vt-jK179eaMMVcogdnjhbmrjOIwtqFrh94pL48ZyWUc@z> (raw) In-Reply-To: <bug-45793-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45793 --- Comment #4 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> 2010-09-26 03:33:09 UTC --- This is the same location I was seeing the failure before. Now I have no segfault, but valgind shows: ==17145== 48 (32 direct, 16 indirect) bytes in 2 blocks are definitely lost in loss record 48 of 459 ==17145== at 0x4A0515D: malloc (vg_replace_malloc.c:195) ==17145== by 0xCCBB27: xmalloc (xmalloc.c:147) ==17145== by 0x4F4504: gfc_getmem (misc.c:37) ==17145== by 0x4F6E0A: create_int_parameter_array.constprop.22 (module.c:5345) ==17145== by 0x4F7629: use_iso_fortran_env_module (iso-fortran-env.def:91) ==17145== by 0x4FBA2E: gfc_use_module (module.c:5541) ==17145== by 0x4FFCF4: accept_statement (parse.c:1574) ==17145== by 0x502A8A: parse_spec (parse.c:2588) ==17145== by 0x504818: parse_progunit (parse.c:3922) ==17145== by 0x50560B: gfc_parse_file (parse.c:4329) ==17145== by 0x53CBF7: gfc_be_parse_file (f95-lang.c:242) ==17145== by 0x83329F: toplev_main (toplev.c:955) ==17145== Look at the code. e is declared in the function as typr gfc_expr * Unfortunately no pointer is ever allocated for it. It is just luck that it is not segfaulting! static void create_int_parameter_array (const char *name, int size, gfc_expr *value, const char *modname, intmod_id module, int id) { gfc_symtree *tmp_symtree; gfc_symbol *sym; gfc_expr *e; tmp_symtree = gfc_find_symtree (gfc_current_ns->sym_root, name); if (tmp_symtree != NULL) { if (strcmp (modname, tmp_symtree->n.sym->module) == 0) return; else gfc_error ("Symbol '%s' already declared", name); } gfc_get_sym_tree (name, gfc_current_ns, &tmp_symtree, false); sym = tmp_symtree->n.sym; sym->module = gfc_get_string (modname); sym->attr.flavor = FL_PARAMETER; sym->ts.type = BT_INTEGER; sym->ts.kind = gfc_default_integer_kind; sym->attr.use_assoc = 1; sym->from_intmod = module; sym->intmod_sym_id = id; sym->attr.dimension = 1; sym->as = gfc_get_array_spec (); sym->as->rank = 1; sym->as->type = AS_EXPLICIT; sym->as->lower[0] = gfc_get_int_expr (gfc_default_integer_kind, NULL, 1); sym->as->upper[0] = gfc_get_int_expr (gfc_default_integer_kind, NULL, size); sym->value = value; e->shape = gfc_get_shape (1); mpz_init_set_ui (e->shape[0], size); }
next prev parent reply other threads:[~2010-09-26 3:33 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-09-25 19:57 [Bug fortran/45793] New: " jvdelisle at gcc dot gnu.org 2010-09-25 22:43 ` [Bug fortran/45793] " jvdelisle at gcc dot gnu.org 2010-09-26 2:11 ` jvdelisle at gcc dot gnu.org 2010-09-26 7:43 ` kkojima at gcc dot gnu.org 2010-09-26 10:27 ` jvdelisle at gcc dot gnu.org [this message] 2010-09-26 10:42 ` jvdelisle at gcc dot gnu.org 2010-09-26 12:31 ` jvdelisle at gcc dot gnu.org 2010-09-26 13:22 ` kkojima at gcc dot gnu.org 2010-09-26 13:44 ` burnus at gcc dot gnu.org 2010-09-26 15:17 ` jvdelisle at gcc dot gnu.org 2010-09-26 16:43 ` jvdelisle at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20100926102700.vt-jK179eaMMVcogdnjhbmrjOIwtqFrh94pL48ZyWUc@z \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).