Home > Internal Compiler > Internal Compiler Error In Output Die At Dwarf2out.c

Internal Compiler Error In Output Die At Dwarf2out.c

Which means that if we fix this bug in another way this bug is fixed as well! Comment 2 Markus Trippelsdorf 2015-03-27 07:13:35 UTC Created attachment 35158 [details] reduced testcase markus@x4 tmp % g++ -std=gnu++1y -flto -g -O2 -r -nostdlib tcp_client.ii lto1: internal compiler error: Segmentation fault 0xa2766f We want to avoid having an FDE kept around when the function it refers to is discarded. Expected results: This shell script demonstrates a but in GNU Fortran (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50) When using that version of gfortran, the following error is generated: "bug.f:7: internal compiler http://mttags.com/internal-compiler/internal-compiler-error-in-dwarf2out-frame-debug-expr-at-dwarf2out-c.php

Contributed by Gary Funck ([email protected]). for unwind info). It seems that all the files are needed to reproduce the ICE. Modified: branches/gcc-4_7-branch/gcc/testsuite/ChangeLog branches/gcc-4_7-branch/gcc/testsuite/gcc.target/i386/pr9771-1.c Comment 25 Chen Gang 2015-09-05 02:49:09 UTC (In reply to Richard Henderson from comment #20) > Author: rth > Date: Thu Jan 16 16:33:30 2014 > New Revision: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54694

This gets called *after* the epilogue code has been generated. */ void dwarf2out_end_epilogue (unsigned int line ATTRIBUTE_UNUSED, const char *file ATTRIBUTE_UNUSED) { dw_fde_ref fde; char label[MAX_ARTIFICIAL_LABEL_BYTES]; last_var_location_insn = NULL; cached_next_real_insn = Reduced: markus@x4 tmp % cat test.i typedef struct { } floatx80; register struct CPUX86State *env asm ("ebp"); floatx80 float64_to_floatx80 (int, int); typedef struct { floatx80 d; } FPReg; struct CPUX86State { Personal Open source Business Explore Sign up Sign in Pricing Blog Support Search GitHub This repository Watch 62 Star 538 Fork 223 gflags/gflags Code Issues 22 Pull requests 1 Projects So at least for branches I think my patch is the way to go - eventually guarded with in_lto_p (if you really insist on that...) Comment 31 Eric Botcazou 2015-04-27 09:15:44

  1. The ICE is at different location and > adding -mno-avx doesn't help.
  2. But what definitely happens is that we "screw up" BLOCK trees in a major way with LTO (see PR47799 for some details).
  3. I compiled with the following cmd: g++ -g -std=c++11 -o db_route_lookup db_route_lookup.cpp db11/*.cpp Tags: internal Edit Tag help Stephen Mathews (busysteve) wrote on 2015-11-19: #1 tmp/ generated output from GCC Edit
  4. When it's 12 bytes, the first 4 bytes are 0xffffffff, followed by the length stored in the next 8 bytes.
  5. Please include the complete backtrace with any bug report.
  6. The problem occurs on any use of DEFINE_string, so not only when building gflags itself, but also when building an application that uses gflags.
  7. We recommend upgrading to the latest Safari, Google Chrome, or Firefox.
  8. Format For Printing -XML -Clone This Bug -Top of page Home | New | Browse | Search | [?] | Reports | Help | NewAccount | Log In Remember [x] |
  9. So that explains that, but still this crash is happening with just -flto=4 (and default -flto-partition=balanced) for me.
  10. For GCC 4.9, I got [hjl@gnu-6 pr54694]$ cat x.i typedef struct { } floatx80; register struct CPUX86State *env asm ("ebp"); floatx80 float64_to_floatx80 (int, int); typedef struct { floatx80 d; } FPReg;

Comment 4 Toralf Förster 2012-09-26 17:18:53 UTC Created attachment 28287 [details] cc -E -v attached the output of n22 /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/i386-softmmu # i686-pc-linux-gnu-gcc -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/slirp -I. -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1 -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/fpu -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/linux-headers -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/tcg -I/var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1/tcg/i386 -fPIE -DPIE Comment 13 Markus Trippelsdorf 2015-03-31 15:08:19 UTC Created attachment 35193 [details] reduced testcase Started with r220011. Comment 6 Richard Biener 2015-03-30 11:46:24 UTC Btw, I always wondered why dwarf2out.c doesn't create such stubs itself when it requires a parent (via force_decl_die). Derived from DWARF 1 implementation of Ron Guilmette ([email protected]).

The CFA register and offset, which may change during the course of the function, are used to calculate its value at runtime. GCC Bugzilla – Bug54694 [4.7/4.8 Regression] internal compiler error: in dwarf2out_frame_debug_expr, at dwarf2out.c:2387 Last modified: 2015-09-05 02:49:09 UTC Home | New | Browse | Search | [?] | Reports | Help It shouldn't be marked as fixed. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48508 Comment 22 Jakub Jelinek 2014-01-16 19:16:18 UTC Author: jakub Date: Thu Jan 16 19:15:46 2014 New Revision: 206679 URL: http://gcc.gnu.org/viewcvs?rev=206679&root=gcc&view=rev Log: PR debug/54694 * gcc.target/i386/pr9771-1.c (main): Rename to... (real_main): ...

Comment 18 Richard Biener 2015-04-07 10:06:56 UTC Gone latent with inliner heuristic changes, -fno-inline -flto-partition=max is now required to reproduce the ICE (with -O -g, of course). Comment 6 Toralf Förster 2013-01-03 19:35:16 UTC As long as no fixed gcc version is released - in Gentoo land we do have this work around for now : https://bugs.gentoo.org/show_bug.cgi?id=434908#c11 (Workaround: We use a local patch that fixes up the limbo list again: @@ -24063,6 +24080,11 @@ dwarf2out_finish (const char *filename) } #endif resolve_addr (comp_unit_die ()); + /* resolve_addr calls force_decl_die, which Status: RESOLVED FIXED Alias: None Product: gcc Classification: Unclassified Component: debug (show other bugs) Version: 4.6.3 Importance: P3 normal Target Milestone: 4.7.4 Assignee: Richard Henderson URL: Keywords: Duplicates (1): 59763 (view

I will try running with exactly the same commandline arguments as you. navigate to this website Wonder why do we partition a single CU input at all, and why we decide to put a lambda function into a different partition from the one containing it. Comment 6 Joshua Conner 2011-11-06 19:01:26 UTC I ran into this bug building SPEC2k for ARM (176.gcc) w/LTO, and have done some investigation. Comment 3 Brad Bell 2011-10-25 15:29:54 EDT Would it be possible to just replace some part of the compiler executable, and make that part available on the web, instead of having

As far as I understood imposing constraints like this to the partitioner is hard because either you implement the same constraints into the inliner as well or you eventually blow up More about the author schuhschuh added Type-Defect Priority-Medium labels Mar 24, 2015 gflags member schuhschuh commented Mar 24, 2015 Comment #1 originally posted by schuhschuh on 2008-08-29T23:49:44.000Z: I tried compiling on gcc 4.2.1, and was All supported gcc versions are affected. It is still a mystery how we avoid gimple_expand_cfg (void) { ... /* We are now committed to emitting code for this function.

Description Toralf Förster 2012-09-24 21:10:17 UTC I originally reported it here https://bugs.gentoo.org/show_bug.cgi?id=434908 but t could not be reproduced by one gentoo dev, nevertheless here again : n22 /var/tmp/portage/app-emulation/qemu-kvm-1.1.1-r3/work/qemu-kvm-1.1.1 # make V=1 Otherwise it is fine. Lu from comment #12) > > *** Bug 59763 has been marked as a duplicate of this bug. *** > > Are you sure this is a duplicate? check my blog PR lto/48508 PR lto/48437 * tree-streamer-out.c (streamer_write_chain): Stream DECL_EXTERNAL VAR_DECLs and FUNCTION_DECLs locally. * g++.dg/lto/pr48508-1_0.C: New testcase. * g++.dg/lto/pr48508-1_1.C: Likewise.

Does not fail with C but only C++ but is valid source for both. I did it again with -g and got the same result: % g++ -g -c bad.cc % gflags member schuhschuh commented Mar 24, 2015 Comment #7 originally posted by schuhschuh on force_decl_die (tdecl); !

Now the question is what guarantees that this does not happen?

Description Avi Kivity 2015-03-25 10:47:31 UTC lto1: internal compiler error: Segmentation fault 0xa283bf crash_signal ../../gcc/toplev.c:383 0x111c7b0 htab_hash_string ../../libiberty/hashtab.c:839 0x6d06bf external_ref_hasher::hash(external_ref const*) ../../gcc/dwarf2out.c:7763 0x6d06bf hash_table::find_slot(external_ref const*, insert_option) ../../gcc/hash-table.h:652 0x6d06bf lookup_external_ref However, there are probably still a lot of broken compilers installed, so maybe it would be a good idea to put a workaround in gflags. See PR47324. */ static void output_loc_operands (dw_loc_descr_ref loc, int for_eh_or_skip) { dw_val_ref val1 = &loc->dw_loc_oprnd1; dw_val_ref val2 = &loc->dw_loc_oprnd2; switch (loc->dw_loc_opc) { #ifdef DWARF2_DEBUGGING_INFO case DW_OP_const2u: case DW_OP_const2s: dw2_asm_output_data (2, val1->v.val_int, Adding these 2 lines always fixes the test case provided by mthuurne (for me).

Run the attached bash script Actual results: This shell script demonstrates a bug in GNU Fortran (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50) When using that version of gfortran, the following error Can you maybe explore workarounds locally? Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.target/i386/pr9771-1.c Comment 23 Jakub Jelinek 2014-01-16 19:21:21 UTC Author: jakub Date: Thu Jan 16 19:20:50 2014 New Revision: 206680 URL: http://gcc.gnu.org/viewcvs?rev=206680&root=gcc&view=rev Log: PR debug/54694 * gcc.target/i386/pr9771-1.c (main): Rename to... http://mttags.com/internal-compiler/internal-compiler-error-in-mem-loc-descriptor-at-dwarf2out-c.php decl_function_context of the lambda function should give you the containing function.

l) return size; for (size = 0, l = loc; l != NULL; l = l->dw_loc_next) { l->dw_loc_addr = size; size += size_of_loc_descr (l); } return size; } /* Return the PTR_SIZE : DWARF2_ADDR_SIZE)); ASM_OUTPUT_LABEL (asm_out_file, l2); /* Loop through all of the FDE's. */ FOR_EACH_VEC_ELT (*fde_vec, i, fde) { unsigned int k; /* Don't emit EH unwind info for leaf functions Just create a DIE with enough info for the debugger (I suppose that's the linkage name? tdie = lookup_decl_die (tdecl); } if (tdie) { --- 23950,23964 ---- && DECL_EXTERNAL (tdecl) && DECL_ABSTRACT_ORIGIN (tdecl) == NULL_TREE) { ! /* Creating a full DIE for tdecl is overly expensive

Can someone please have a look? But hopefully there's another solution that will work as well. gflags member schuhschuh commented Mar 24, 2015 Comment #2 originally posted by schuhschuh on 2008-08-30T09:07:00.000Z: I use this as the source file (define.cpp): #include DEFINE_string(name, "default", "help"); And the following command Comment 12 Markus Trippelsdorf 2015-03-31 13:11:01 UTC Created attachment 35191 [details] reduced testcase Further reduced with -flto-partition=max, but still 4.3k.

Edit bug mail Other bug subscribers Subscribe someone else Bug attachments tmp/ generated output from GCC (edit) Add attachment • Take the tour • Read the guide © 2004-2016 CanonicalLtd. Instead create a stub DIE without a type if we have a context DIE present. * g++.dg/lto/pr65549_0.C: New testcase. From reading the comments and code, it appears that we're trying to catch a case where we have a declaration followed by a definition? And honestly I don't see a way around it.

See for instructions. Comment 3 Jan Hubicka 2011-04-08 15:17:33 UTC To me all those debugging ICEs seems alike, but bugzilla don't seem to find any other output_die ICE. Comment 19 Richard Henderson 2014-01-16 16:24:26 UTC Author: rth Date: Thu Jan 16 16:23:54 2014 New Revision: 206666 URL: http://gcc.gnu.org/viewcvs?rev=206666&root=gcc&view=rev Log: PR debug/54694 Diagnose frame_pointer_required vs fixed hfp Added: branches/gcc-4_8-branch/gcc/testsuite/gcc.target/i386/pr54694.c Modified: We are creating a DIE for the same parameter again, via #0 gen_formal_parameter_die (node=0x7ffff5b6f5d8, origin=0x0, emit_name_p=1 '\001', context_die=0x7ffff5bf0cd0) at /space/rguenther/src/svn/trunk/gcc/dwarf2out.c:16703 #1 0x000000000062e8b6 in gen_decl_die (decl=0x7ffff5b6f5d8, origin=0x0, context_die=0x7ffff5bf0cd0) at /space/rguenther/src/svn/trunk/gcc/dwarf2out.c:19576 #2 0x0000000000624ac7

Later, when we are generating the debug information for the non-slow version of the function, js_InternNonIntElementId, we process the declaration that appears inside that function: extern bool js_InternNonIntElementIdSlow (JSContext *, JSObject Reducing...