public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/97541] New: Ada failed to bootstrap: Error: file table slot 1 is already occupied by a different file
@ 2020-10-23 11:40 hjl.tools at gmail dot com
2020-10-23 11:43 ` [Bug ada/97541] " hjl.tools at gmail dot com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2020-10-23 11:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97541
Bug ID: 97541
Summary: Ada failed to bootstrap: Error: file table slot 1 is
already occupied by a different file
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: hjl.tools at gmail dot com
Target Milestone: ---
Target: i386,x86-64
With --gdwarf-4 assembler on Linux/x86-64, I got
$ /export/users/hjl/build/gnu/tools-build/gcc/build-x86_64-linux/./gcc/xgcc
-B/export/users/hjl/build/gnu/tools-build/gcc/build-x86_64-linux/./gcc/
-B/usr/gcc-11.0.0-x86-64/x86_64-pc-linux-gnu/bin/
-B/usr/gcc-11.0.0-x86-64/x86_64-pc-linux-gnu/lib/ -isystem
/usr/gcc-11.0.0-x86-64/x86_64-pc-linux-gnu/include -isystem
/usr/gcc-11.0.0-x86-64/x86_64-pc-linux-gnu/sys-include -fchecking=1 -c -g -O2
-m32 -W -Wall -gnatpg -nostdinc -m32 a-stzunb.adb -c
/tmp/cc6QPugj.s: Assembler messages:
/tmp/cc6QPugj.s:42: Error: file table slot 1 is already occupied by a different
file (/tmp/cc6QPugj.s vs a-stzunb.adb)
Ada generates:
.file "a-stzunb.adb"
.text
.Ltext0:
.align 2
.p2align 4
.globl ada__strings__wide_wide_unbounded___size__2
.type ada__strings__wide_wide_unbounded___size__2, @function
ada__strings__wide_wide_unbounded___size__2:
.LFB5:
.cfi_startproc
movl $64, %eax
xorl %edx, %edx
ret
.cfi_endproc
.LFE5:
.size ada__strings__wide_wide_unbounded___size__2,
.-ada__strings__wid
e_wide_unbounded___size__2
.align 2
.p2align 4
.globl
ada__strings__wide_wide_unbounded__unbounded_wide_wide_stringDA_
_2
.type
ada__strings__wide_wide_unbounded__unbounded_wide_wide_stringDA_
_2, @function
ada__strings__wide_wide_unbounded__unbounded_wide_wide_stringDA__2:
.LFB12:
.cfi_startproc
movl 4(%esp), %eax
movl 4(%eax), %eax
#APP
# 82 "s-atocou.adb" 1 <<<<<<<< File 1
lock incl 4(%eax)
# 0 "" 2
#NO_APP
ret
.cfi_endproc
.LFE12:
.size
ada__strings__wide_wide_unbounded__unbounded_wide_wide_stringDA_
_2, .-ada__strings__wide_wide_unbounded__unbounded_wide_wide_stringDA__2
.align 2
.p2align 4
.globl ada__strings__wide_wide_unbounded__adjust__2
.type ada__strings__wide_wide_unbounded__adjust__2, @function
ada__strings__wide_wide_unbounded__adjust__2:
.LVL0:
.LFB47:
.file 1 "a-stzunb.adb" <<<< File 1 again
.loc 1 478 4 view -0
.cfi_startproc
.LBB706:
.LBB707:
.LBB708:
.file 2 "s-atocou.adb"
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug ada/97541] Ada failed to bootstrap: Error: file table slot 1 is already occupied by a different file
2020-10-23 11:40 [Bug ada/97541] New: Ada failed to bootstrap: Error: file table slot 1 is already occupied by a different file hjl.tools at gmail dot com
@ 2020-10-23 11:43 ` hjl.tools at gmail dot com
2020-10-23 12:54 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2020-10-23 11:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97541
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2020-10-23
Status|UNCONFIRMED |NEW
CC| |jakub at redhat dot com
--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
This is triggered by r11-3693:
commit 6923255e35a3d54f2083ad0f67edebb3f1b86506
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Oct 7 10:55:35 2020 +0200
debug: Pass --gdwarf-N to assembler if fixed gas is detected during
configure
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug ada/97541] Ada failed to bootstrap: Error: file table slot 1 is already occupied by a different file
2020-10-23 11:40 [Bug ada/97541] New: Ada failed to bootstrap: Error: file table slot 1 is already occupied by a different file hjl.tools at gmail dot com
2020-10-23 11:43 ` [Bug ada/97541] " hjl.tools at gmail dot com
@ 2020-10-23 12:54 ` jakub at gcc dot gnu.org
2020-10-23 12:57 ` hjl.tools at gmail dot com
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-10-23 12:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97541
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So isn't that yet another thing that needs to be changed/fixed in gas?
Plus on the gcc side add a test for that once it is fixed in binutils?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug ada/97541] Ada failed to bootstrap: Error: file table slot 1 is already occupied by a different file
2020-10-23 11:40 [Bug ada/97541] New: Ada failed to bootstrap: Error: file table slot 1 is already occupied by a different file hjl.tools at gmail dot com
2020-10-23 11:43 ` [Bug ada/97541] " hjl.tools at gmail dot com
2020-10-23 12:54 ` jakub at gcc dot gnu.org
@ 2020-10-23 12:57 ` hjl.tools at gmail dot com
2020-10-23 13:16 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2020-10-23 12:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97541
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Jakub Jelinek from comment #2)
> So isn't that yet another thing that needs to be changed/fixed in gas?
> Plus on the gcc side add a test for that once it is fixed in binutils?
I think this is a GCC bug. We can't assign the same file number to different
files:
# 82 "s-atocou.adb" 1
...
.file 1 "a-stzunb.adb"
This seems to be Ada specific. I can't find a testcase in C nor C++.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug ada/97541] Ada failed to bootstrap: Error: file table slot 1 is already occupied by a different file
2020-10-23 11:40 [Bug ada/97541] New: Ada failed to bootstrap: Error: file table slot 1 is already occupied by a different file hjl.tools at gmail dot com
` (2 preceding siblings ...)
2020-10-23 12:57 ` hjl.tools at gmail dot com
@ 2020-10-23 13:16 ` jakub at gcc dot gnu.org
2020-10-23 13:32 ` mark at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-10-23 13:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97541
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|jakub at redhat dot com |mark at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
# 82 "s-atocou.adb" 1
isn't a .file assignment though.
As I said earlier, if we don't want to revert the r11-3693 change and be able
to specify -gdwarf-5 etc. to gas even when compiling files that contain
explicit .debug_info from the compiler, then we need gas to act as if all that
option affects is the version of the .debug_line emitted for explicit
.file*/.loc* directives if present and nothing else (whenever the assembly
contains manual
.file*/.loc* directives or .debug_{info,line,...} sections). So, basically,
gas can start preparing for generation of its own .debug_* sections but should
roll all that back when it sees .file/.loc directives or user
.debug_{info,line} sections (perhaps some others).
Or, the other option is not to pass -gdwarf-5 to gas, but pass
-gdwarf-line-version=5 or whatever other new option, which would only change
the decision on if gas emits .debug_line section because of .file*/.loc*
directives (and .debug_line is not present), what version of that to use.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug ada/97541] Ada failed to bootstrap: Error: file table slot 1 is already occupied by a different file
2020-10-23 11:40 [Bug ada/97541] New: Ada failed to bootstrap: Error: file table slot 1 is already occupied by a different file hjl.tools at gmail dot com
` (3 preceding siblings ...)
2020-10-23 13:16 ` jakub at gcc dot gnu.org
@ 2020-10-23 13:32 ` mark at gcc dot gnu.org
2020-10-23 13:41 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mark at gcc dot gnu.org @ 2020-10-23 13:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97541
--- Comment #5 from Mark Wielaard <mark at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #4)
> # 82 "s-atocou.adb" 1
> isn't a .file assignment though.
> As I said earlier, if we don't want to revert the r11-3693 change and be
> able to specify -gdwarf-5 etc. to gas even when compiling files that contain
> explicit .debug_info from the compiler, then we need gas to act as if all
> that option affects is the version of the .debug_line emitted for explicit
> .file*/.loc* directives if present and nothing else (whenever the assembly
> contains manual
> .file*/.loc* directives or .debug_{info,line,...} sections).
That is the intention indeed, and I believe that is what binutils gas should be
doing. There used to be a bug where that didn't work for .file 1, but I thought
that was fixed upstream. Is this different from
https://sourceware.org/bugzilla/show_bug.cgi?id=26740
The assembly posted doesn't seem complete, what does ada really pass to gas?
> So, basically,
> gas can start preparing for generation of its own .debug_* sections but
> should roll all that back when it sees .file/.loc directives or user
> .debug_{info,line} sections (perhaps some others).
Like I said above, that is the intention. So if it doesn't work like that it is
simply a bug in gas. It would be helpful to attach the preprocessed file that
ada generates to investigate what is really going on.
> Or, the other option is not to pass -gdwarf-5 to gas, but pass
> -gdwarf-line-version=5 or whatever other new option, which would only change
> the decision on if gas emits .debug_line section because of .file*/.loc*
> directives (and .debug_line is not present), what version of that to use.
That would be another option. But I like to first understand what is really
going on here.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug ada/97541] Ada failed to bootstrap: Error: file table slot 1 is already occupied by a different file
2020-10-23 11:40 [Bug ada/97541] New: Ada failed to bootstrap: Error: file table slot 1 is already occupied by a different file hjl.tools at gmail dot com
` (4 preceding siblings ...)
2020-10-23 13:32 ` mark at gcc dot gnu.org
@ 2020-10-23 13:41 ` jakub at gcc dot gnu.org
2020-10-23 13:45 ` hjl.tools at gmail dot com
2021-07-31 13:11 ` hjl.tools at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-10-23 13:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97541
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 49432
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49432&action=edit
a-stzunb.s.xz
The assembly (though, I don't have binutils 2.35.1+ around, so can't verify
easily myself now).
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug ada/97541] Ada failed to bootstrap: Error: file table slot 1 is already occupied by a different file
2020-10-23 11:40 [Bug ada/97541] New: Ada failed to bootstrap: Error: file table slot 1 is already occupied by a different file hjl.tools at gmail dot com
` (5 preceding siblings ...)
2020-10-23 13:41 ` jakub at gcc dot gnu.org
@ 2020-10-23 13:45 ` hjl.tools at gmail dot com
2021-07-31 13:11 ` hjl.tools at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2020-10-23 13:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97541
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Host| |https://sourceware.org/bugz
| |illa/show_bug.cgi?id=26778
--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
I opened:
https://sourceware.org/bugzilla/show_bug.cgi?id=26778
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug ada/97541] Ada failed to bootstrap: Error: file table slot 1 is already occupied by a different file
2020-10-23 11:40 [Bug ada/97541] New: Ada failed to bootstrap: Error: file table slot 1 is already occupied by a different file hjl.tools at gmail dot com
` (6 preceding siblings ...)
2020-10-23 13:45 ` hjl.tools at gmail dot com
@ 2021-07-31 13:11 ` hjl.tools at gmail dot com
7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2021-07-31 13:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97541
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Host|https://sourceware.org/bugz |
|illa/show_bug.cgi?id=26778 |
See Also| |https://sourceware.org/bugz
| |illa/show_bug.cgi?id=26778
Resolution|--- |MOVED
--- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> ---
Moved.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-07-31 13:11 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-23 11:40 [Bug ada/97541] New: Ada failed to bootstrap: Error: file table slot 1 is already occupied by a different file hjl.tools at gmail dot com
2020-10-23 11:43 ` [Bug ada/97541] " hjl.tools at gmail dot com
2020-10-23 12:54 ` jakub at gcc dot gnu.org
2020-10-23 12:57 ` hjl.tools at gmail dot com
2020-10-23 13:16 ` jakub at gcc dot gnu.org
2020-10-23 13:32 ` mark at gcc dot gnu.org
2020-10-23 13:41 ` jakub at gcc dot gnu.org
2020-10-23 13:45 ` hjl.tools at gmail dot com
2021-07-31 13:11 ` hjl.tools at gmail dot com
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).