* [Bug target/64212] ICE [in noninterposable_alias, at symtab.c:1706]
2014-12-07 17:13 [Bug c/64212] New: ICE [in noninterposable_alias, at symtab.c:1706] chris at thdsys dot com
@ 2014-12-08 7:43 ` mpolacek at gcc dot gnu.org
2014-12-08 13:33 ` [Bug target/64212] [5 Regression] " rguenth at gcc dot gnu.org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2014-12-08 7:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64212
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |x86_64-w64-mingw32
CC| |mpolacek at gcc dot gnu.org
Component|c |target
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Can't reproduce on x86_64-linux.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/64212] [5 Regression] ICE [in noninterposable_alias, at symtab.c:1706]
2014-12-07 17:13 [Bug c/64212] New: ICE [in noninterposable_alias, at symtab.c:1706] chris at thdsys dot com
2014-12-08 7:43 ` [Bug target/64212] " mpolacek at gcc dot gnu.org
@ 2014-12-08 13:33 ` rguenth at gcc dot gnu.org
2015-01-28 8:22 ` [Bug target/64212] [4.9/5 " jakub at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-12-08 13:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64212
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
Target Milestone|--- |5.0
Summary|ICE [in |[5 Regression] ICE [in
|noninterposable_alias, at |noninterposable_alias, at
|symtab.c:1706] |symtab.c:1706]
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/64212] [4.9/5 Regression] ICE [in noninterposable_alias, at symtab.c:1706]
2014-12-07 17:13 [Bug c/64212] New: ICE [in noninterposable_alias, at symtab.c:1706] chris at thdsys dot com
2014-12-08 7:43 ` [Bug target/64212] " mpolacek at gcc dot gnu.org
2014-12-08 13:33 ` [Bug target/64212] [5 Regression] " rguenth at gcc dot gnu.org
@ 2015-01-28 8:22 ` jakub at gcc dot gnu.org
2015-01-30 15:27 ` ktietz at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-28 8:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64212
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-01-28
CC| |jakub at gcc dot gnu.org,
| |ktietz at gcc dot gnu.org
Summary|[5 Regression] ICE [in |[4.9/5 Regression] ICE [in
|noninterposable_alias, at |noninterposable_alias, at
|symtab.c:1706] |symtab.c:1706]
Ever confirmed|0 |1
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Reduced testcase:
inline void
foo (void)
{
}
__attribute__ ((__dllimport__))
void foo (void);
void
bar (void)
{
foo ();
}
No options are needed, reproduced with x86_64-linux -> x86_64-mingw32 cross.
ICEs the same even with an extra extern void foo (void); prototype above the
inline, and no matter whether -std=gnu89 or -std=c11 is used.
Kai, is this even meant to be valid (i.e. shouldn't we reject this - adding
dllimport attribute after inline fn definition)? And, is it really a
regression? Don't have time to build cross-compilers for older gcc versions,
perhaps you have some older ones around?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/64212] [4.9/5 Regression] ICE [in noninterposable_alias, at symtab.c:1706]
2014-12-07 17:13 [Bug c/64212] New: ICE [in noninterposable_alias, at symtab.c:1706] chris at thdsys dot com
` (2 preceding siblings ...)
2015-01-28 8:22 ` [Bug target/64212] [4.9/5 " jakub at gcc dot gnu.org
@ 2015-01-30 15:27 ` ktietz at gcc dot gnu.org
2015-01-30 15:58 ` ktietz at gcc dot gnu.org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-01-30 15:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64212
--- Comment #3 from Kai Tietz <ktietz at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> Reduced testcase:
>
> inline void
> foo (void)
> {
> }
>
> __attribute__ ((__dllimport__))
> void foo (void);
>
> void
> bar (void)
> {
> foo ();
> }
>
> No options are needed, reproduced with x86_64-linux -> x86_64-mingw32 cross.
> ICEs the same even with an extra extern void foo (void); prototype above the
> inline, and no matter whether -std=gnu89 or -std=c11 is used.
> Kai, is this even meant to be valid (i.e. shouldn't we reject this - adding
> dllimport attribute after inline fn definition)? And, is it really a
> regression? Don't have time to build cross-compilers for older gcc
> versions, perhaps you have some older ones around?
I think this scenario is valid. Of course it is better style for having first
the prototype and then its inline-function.
So by changing sample this way:
__attribute__ ((__dllimport__))
void foo (void);
inline void
foo (void)
{
}
void
bar (void)
{
foo ();
}
There is no ICE. The point here is that dllimport indicates that function is
external, but by the dllimport-attribute 'function_and_variable_visibility'
pass gets confused. In symtab_node::noninterposable_alias() we assert on
'decl_binds_to_current_def_p' returning true, which is of course the case for
the inline-case.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/64212] [4.9/5 Regression] ICE [in noninterposable_alias, at symtab.c:1706]
2014-12-07 17:13 [Bug c/64212] New: ICE [in noninterposable_alias, at symtab.c:1706] chris at thdsys dot com
` (3 preceding siblings ...)
2015-01-30 15:27 ` ktietz at gcc dot gnu.org
@ 2015-01-30 15:58 ` ktietz at gcc dot gnu.org
2015-02-02 23:33 ` hubicka at gcc dot gnu.org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-01-30 15:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64212
--- Comment #4 from Kai Tietz <ktietz at gcc dot gnu.org> ---
A side-note: Of course the dllimport attribute is part of the prototype. So
for C case it would be consistent to have the dllimport-attribute also
specified for the inline, which gets rejected. This reject might be doubtful
as an inline-function isn't necessarily inlined, and so the function gets
called.
A second side-note: This issue is only happening for C compiler. For C++
semantics of inline is different, and sample-code works as expected.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/64212] [4.9/5 Regression] ICE [in noninterposable_alias, at symtab.c:1706]
2014-12-07 17:13 [Bug c/64212] New: ICE [in noninterposable_alias, at symtab.c:1706] chris at thdsys dot com
` (4 preceding siblings ...)
2015-01-30 15:58 ` ktietz at gcc dot gnu.org
@ 2015-02-02 23:33 ` hubicka at gcc dot gnu.org
2015-02-25 15:07 ` ktietz at gcc dot gnu.org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: hubicka at gcc dot gnu.org @ 2015-02-02 23:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64212
--- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Well, can someone overwrite dllimport symbol by different definition?
If not, it is a bug of decl_binds_to_current_def_p to return false here.
If it can be inteprposed, I think the function
symtab_node::noninterposable_alias should remove dllimport attribute on the
alias created and so should symtab_node::make_decl_local
Honza
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/64212] [4.9/5 Regression] ICE [in noninterposable_alias, at symtab.c:1706]
2014-12-07 17:13 [Bug c/64212] New: ICE [in noninterposable_alias, at symtab.c:1706] chris at thdsys dot com
` (5 preceding siblings ...)
2015-02-02 23:33 ` hubicka at gcc dot gnu.org
@ 2015-02-25 15:07 ` ktietz at gcc dot gnu.org
2015-02-25 16:09 ` ktietz at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-25 15:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64212
--- Comment #6 from Kai Tietz <ktietz at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #5)
> Well, can someone overwrite dllimport symbol by different definition?
> If not, it is a bug of decl_binds_to_current_def_p to return false here.
> If it can be inteprposed, I think the function
> symtab_node::noninterposable_alias should remove dllimport attribute on the
> alias created and so should symtab_node::make_decl_local
Thanks Honza,
well, dllimport symbol can be interposed ... well their function-stub can. So
variant two seems to be the right thing to do.
I am about to prepare a patch for this ...
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/64212] [4.9/5 Regression] ICE [in noninterposable_alias, at symtab.c:1706]
2014-12-07 17:13 [Bug c/64212] New: ICE [in noninterposable_alias, at symtab.c:1706] chris at thdsys dot com
` (6 preceding siblings ...)
2015-02-25 15:07 ` ktietz at gcc dot gnu.org
@ 2015-02-25 16:09 ` ktietz at gcc dot gnu.org
2015-02-25 17:36 ` ktietz at gcc dot gnu.org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-25 16:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64212
--- Comment #7 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Tested patch posted at https://gcc.gnu.org/ml/gcc-patches/2015-02/msg01502.html
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/64212] [4.9/5 Regression] ICE [in noninterposable_alias, at symtab.c:1706]
2014-12-07 17:13 [Bug c/64212] New: ICE [in noninterposable_alias, at symtab.c:1706] chris at thdsys dot com
` (7 preceding siblings ...)
2015-02-25 16:09 ` ktietz at gcc dot gnu.org
@ 2015-02-25 17:36 ` ktietz at gcc dot gnu.org
2015-02-25 17:39 ` ktietz at gcc dot gnu.org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-25 17:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64212
--- Comment #8 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Author: ktietz
Date: Wed Feb 25 16:44:26 2015
New Revision: 220982
URL: https://gcc.gnu.org/viewcvs?rev=220982&root=gcc&view=rev
Log:
PR target/64212
* symtab.c (symtab::make_decl_local): Set DECL_IMPORT_P explicit to 0.
(symtab::noninterposable_alias): Likewise.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/symtab.c
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/64212] [4.9/5 Regression] ICE [in noninterposable_alias, at symtab.c:1706]
2014-12-07 17:13 [Bug c/64212] New: ICE [in noninterposable_alias, at symtab.c:1706] chris at thdsys dot com
` (8 preceding siblings ...)
2015-02-25 17:36 ` ktietz at gcc dot gnu.org
@ 2015-02-25 17:39 ` ktietz at gcc dot gnu.org
2015-02-25 17:44 ` ktietz at gcc dot gnu.org
2015-03-02 10:21 ` ktietz at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-25 17:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64212
--- Comment #9 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Author: ktietz
Date: Wed Feb 25 16:46:34 2015
New Revision: 220983
URL: https://gcc.gnu.org/viewcvs?rev=220983&root=gcc&view=rev
Log:
Merged from mainline
PR target/64212
* symtab.c (symtab::make_decl_local): Set DECL_IMPORT_P explicit to 0.
(symtab::noninterposable_alias): Likewise.
Modified:
branches/gcc-4_9-branch/gcc/ChangeLog
branches/gcc-4_9-branch/gcc/symtab.c
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/64212] [4.9/5 Regression] ICE [in noninterposable_alias, at symtab.c:1706]
2014-12-07 17:13 [Bug c/64212] New: ICE [in noninterposable_alias, at symtab.c:1706] chris at thdsys dot com
` (9 preceding siblings ...)
2015-02-25 17:39 ` ktietz at gcc dot gnu.org
@ 2015-02-25 17:44 ` ktietz at gcc dot gnu.org
2015-03-02 10:21 ` ktietz at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-02-25 17:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64212
Kai Tietz <ktietz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #10 from Kai Tietz <ktietz at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/64212] [4.9/5 Regression] ICE [in noninterposable_alias, at symtab.c:1706]
2014-12-07 17:13 [Bug c/64212] New: ICE [in noninterposable_alias, at symtab.c:1706] chris at thdsys dot com
` (10 preceding siblings ...)
2015-02-25 17:44 ` ktietz at gcc dot gnu.org
@ 2015-03-02 10:21 ` ktietz at gcc dot gnu.org
11 siblings, 0 replies; 13+ messages in thread
From: ktietz at gcc dot gnu.org @ 2015-03-02 10:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64212
Kai Tietz <ktietz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |timothygu99 at gmail dot com
--- Comment #11 from Kai Tietz <ktietz at gcc dot gnu.org> ---
*** Bug 61916 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 13+ messages in thread