public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/44689]  New: -fenable-icf-debug -fprofile-generate causes segfault in cp_function_decl_explicit_p
@ 2010-06-27 11:36 zsojka at seznam dot cz
  2010-07-11  7:55 ` [Bug debug/44689] " janus at gcc dot gnu dot org
  2010-07-11  7:58 ` janus at gcc dot gnu dot org
  0 siblings, 2 replies; 4+ messages in thread
From: zsojka at seznam dot cz @ 2010-06-27 11:36 UTC (permalink / raw)
  To: gcc-bugs

Command line:
$ g++ -g -fenable-icf-debug -fprofile-generate testcase.C

----- testcase.C -----
void foo() {}
----------------------
(actually reduced from g++.dg/debug/dwarf2/icf.C)

Valgrind output:
$ valgrind --trace-children=yes -q
/mnt/svn/gcc-trunk/binary-161428-lto-fortran-checking-yes-rtl-df/bin/g++ -g
-fenable-icf-debug -fprofile-generate testcase.C
==20380== Invalid read of size 2
==20380==    at 0x629127: cp_function_decl_explicit_p (cp-objcp-common.c:159)
==20380==    by 0x7705A7: gen_subprogram_die (dwarf2out.c:18598)
==20380==    by 0x76681D: force_decl_die (dwarf2out.c:20191)
==20380==    by 0x7669AF: dwarf2out_direct_call (dwarf2out.c:21053)
==20380==    by 0x7C9743: final_scan_insn (final.c:2698)
==20380==    by 0x7C9F3D: final (final.c:1719)
==20380==    by 0x7CA188: rest_of_handle_final (final.c:4245)
==20380==    by 0x8E8DAD: execute_one_pass (passes.c:1580)
==20380==    by 0x8E9044: execute_pass_list (passes.c:1635)
==20380==    by 0x8E9056: execute_pass_list (passes.c:1636)
==20380==    by 0x8E9056: execute_pass_list (passes.c:1636)
==20380==    by 0xA277F5: tree_rest_of_compilation (tree-optimize.c:420)
==20380==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==20380== 
testcase.C:1:13: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r161428 - crash
r153685 - crash
4.4.4 and 4.3.5 don't recognise -fenable-icf-debug


-- 
           Summary: -fenable-icf-debug -fprofile-generate causes segfault in
                    cp_function_decl_explicit_p
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44689


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug debug/44689] -fenable-icf-debug -fprofile-generate causes segfault in cp_function_decl_explicit_p
  2010-06-27 11:36 [Bug debug/44689] New: -fenable-icf-debug -fprofile-generate causes segfault in cp_function_decl_explicit_p zsojka at seznam dot cz
@ 2010-07-11  7:55 ` janus at gcc dot gnu dot org
  2010-07-11  7:58 ` janus at gcc dot gnu dot org
  1 sibling, 0 replies; 4+ messages in thread
From: janus at gcc dot gnu dot org @ 2010-07-11  7:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from janus at gcc dot gnu dot org  2010-07-11 07:55 -------
Subject: Bug 44689

Author: janus
Date: Sun Jul 11 07:55:11 2010
New Revision: 162052

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162052
Log:
2010-07-11  Janus Weil  <janus@gcc.gnu.org>

        PR fortran/44689
        * decl.c (build_sym,attr_decl1): Only build the class container if the
        symbol has sufficient attributes.
        * expr.c (gfc_check_pointer_assign): Use class_pointer instead of
        pointer attribute for classes.
        * match.c (gfc_match_allocate,gfc_match_deallocate): Ditto.
        * module.c (MOD_VERSION): Bump.
        (enum ab_attribute,attr_bits): Add AB_CLASS_POINTER.
        (mio_symbol_attribute): Handle class_pointer attribute.
        * parse.c (parse_derived): Use class_pointer instead of pointer
        attribute for classes.
        * primary.c (gfc_variable_attr,gfc_expr_attr): Ditto.
        * resolve.c (resolve_structure_cons,resolve_deallocate_expr,
        resolve_allocate_expr,resolve_fl_derived): Ditto.
        (resolve_fl_var_and_proc): Check for class_ok attribute.

2010-07-11  Janus Weil  <janus@gcc.gnu.org>

        PR fortran/44689
        * gfortran.dg/class_24.f03: New.

Added:
    trunk/gcc/testsuite/gfortran.dg/class_24.f03
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/decl.c
    trunk/gcc/fortran/expr.c
    trunk/gcc/fortran/match.c
    trunk/gcc/fortran/module.c
    trunk/gcc/fortran/parse.c
    trunk/gcc/fortran/primary.c
    trunk/gcc/fortran/resolve.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44689


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug debug/44689] -fenable-icf-debug -fprofile-generate causes segfault in cp_function_decl_explicit_p
  2010-06-27 11:36 [Bug debug/44689] New: -fenable-icf-debug -fprofile-generate causes segfault in cp_function_decl_explicit_p zsojka at seznam dot cz
  2010-07-11  7:55 ` [Bug debug/44689] " janus at gcc dot gnu dot org
@ 2010-07-11  7:58 ` janus at gcc dot gnu dot org
  1 sibling, 0 replies; 4+ messages in thread
From: janus at gcc dot gnu dot org @ 2010-07-11  7:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from janus at gcc dot gnu dot org  2010-07-11 07:58 -------
(In reply to comment #1)
> Subject: Bug 44689
> 
> Author: janus
> Date: Sun Jul 11 07:55:11 2010
> New Revision: 162052
> 
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162052

Sorry, this commit was actually for PR 44869. I mixed up the numbers.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44689


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug debug/44689] -fenable-icf-debug -fprofile-generate causes segfault in cp_function_decl_explicit_p
       [not found] <bug-44689-4@http.gcc.gnu.org/bugzilla/>
@ 2010-10-22 14:33 ` zsojka at seznam dot cz
  0 siblings, 0 replies; 4+ messages in thread
From: zsojka at seznam dot cz @ 2010-10-22 14:33 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44689

--- Comment #3 from Zdenek Sojka <zsojka at seznam dot cz> 2010-10-22 14:33:22 UTC ---
Created attachment 22120
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22120
different testcase

This one doesn't need -fprofile-generate

$ gcc -fenable-icf-debug -g pr44689-2.C
==20573== Invalid read of size 2
==20573==    at 0x5FFFF7: cp_function_decl_explicit_p (cp-objcp-common.c:164)
==20573==    by 0x74F14E: gen_subprogram_die (dwarf2out.c:18861)
==20573==    by 0x744B68: force_decl_die (dwarf2out.c:20493)
==20573==    by 0x744C3F: dwarf2out_direct_call (dwarf2out.c:21355)
==20573==    by 0x7AC4AC: final_scan_insn (final.c:2685)
==20573==    by 0x7AC67D: final (final.c:1719)
==20573==    by 0x7ACAB8: rest_of_handle_final (final.c:4231)
==20573==    by 0x8D33DE: execute_one_pass (passes.c:1560)
==20573==    by 0x8D3674: execute_pass_list (passes.c:1615)
==20573==    by 0x8D3686: execute_pass_list (passes.c:1616)
==20573==    by 0x8D3686: execute_pass_list (passes.c:1616)
==20573==    by 0xA204E5: tree_rest_of_compilation (tree-optimize.c:422)
==20573==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==20573== 
pr44689-2.C:5:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-22 14:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-27 11:36 [Bug debug/44689] New: -fenable-icf-debug -fprofile-generate causes segfault in cp_function_decl_explicit_p zsojka at seznam dot cz
2010-07-11  7:55 ` [Bug debug/44689] " janus at gcc dot gnu dot org
2010-07-11  7:58 ` janus at gcc dot gnu dot org
     [not found] <bug-44689-4@http.gcc.gnu.org/bugzilla/>
2010-10-22 14:33 ` zsojka at seznam dot cz

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).