From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D6F103858C33; Mon, 15 May 2023 09:20:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6F103858C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684142452; bh=NOC5HfnrXskf2W15IGoQXBw/WkEp3W34Ji+W1n1nIgU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=KVn2+Uo1qTSeaiVZ32AES/cmkYJzrafNMjey0VYcctYubxV5J6lr0MkDaNDwY8VO1 pTM1PffIlcd6P8myW1E3tXSl5YaoMTFRbkUm/dKc70JRWdE72u79SAukGVrAiUocv1 gmtekcpYpVQr4xh4Ac7pTvMYa05mTX4iSAL+mj5A= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/109805] LTO affecting -fdebug-prefix-map Date: Mon, 15 May 2023 09:20:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: lto X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109805 --- Comment #11 from Richard Biener --- Btw, streaming of the CWD is prone to breakage when it changes between preprocessing and compilation stage. I think at least for C family languag= es the CWD would need to be recorded by the preprocessor and made available via line directives somehow? This also seems "wrong" without LTO. > ls t.c tmp t.c tmp: t.h t.o > gcc -E t.c -o t.i > cd tmp > gcc ../t.i -g .c > readelf -w t.o ... <0>: Abbrev Number: 1 (DW_TAG_compile_unit) DW_AT_producer : (indirect string, offset: 0x0): GNU C17 12.2.1 20220830 [revision e927d1cf141f221c5a32574bde0913307e140984] -mtune=3Dgener= ic -march=3Dx86-64 -g <10> DW_AT_language : 12 (ANSI C99) <11> DW_AT_name : t.c <15> DW_AT_comp_dir : (indirect string, offset: 0x71): /tmp/tmp ... The Directory Table (offset 0x1c): 1 tmp The File Name Table (offset 0x21): Entry Dir Time Size Name 1 0 0 0 t.c 2 1 0 0 t.h and LTO just adds another level of "directory changing" (but for sure a more common one).=