* [Bug c/111437] Some always inline functions are incorrectly warn of as "might not be inlinable"
2023-09-16 21:53 [Bug c/111437] New: Some always inline functions are incorrectly warn of as "might not be inlinable" gb2985 at gmail dot com
@ 2023-09-16 22:14 ` pinskia at gcc dot gnu.org
2023-09-17 6:19 ` [Bug ipa/111437] " gb2985 at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-16 22:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111437
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2023-09-16
Ever confirmed|0 |1
Status|UNCONFIRMED |WAITING
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you attach the preprocessed source where the warning is and the exact
command line you are using to invoke gcc?
I suspect the issue is that the function can be overridden due to use of -fPIC
or something smilar to that.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ipa/111437] Some always inline functions are incorrectly warn of as "might not be inlinable"
2023-09-16 21:53 [Bug c/111437] New: Some always inline functions are incorrectly warn of as "might not be inlinable" gb2985 at gmail dot com
2023-09-16 22:14 ` [Bug c/111437] " pinskia at gcc dot gnu.org
@ 2023-09-17 6:19 ` gb2985 at gmail dot com
2023-09-17 6:22 ` gb2985 at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: gb2985 at gmail dot com @ 2023-09-17 6:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111437
--- Comment #2 from zxuiji <gb2985 at gmail dot com> ---
(In reply to Andrew Pinski from comment #1)
> Can you attach the preprocessed source where the warning is and the exact
> command line you are using to invoke gcc?
>
> I suspect the issue is that the function can be overridden due to use of
> -fPIC or something smilar to that.
Bugzilla wouldn't let me upload it, too big apparently, did it to my google
drive instead:
https://drive.google.com/file/d/16NiT5eWvj_B7QTz5E4zlST6sDCS67HWp/view?usp=sharing
Found the function at line 12375, still the division I expected, would've been
shocked had it been otherwise given it's just division of a allocation size by
an element size
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ipa/111437] Some always inline functions are incorrectly warn of as "might not be inlinable"
2023-09-16 21:53 [Bug c/111437] New: Some always inline functions are incorrectly warn of as "might not be inlinable" gb2985 at gmail dot com
2023-09-16 22:14 ` [Bug c/111437] " pinskia at gcc dot gnu.org
2023-09-17 6:19 ` [Bug ipa/111437] " gb2985 at gmail dot com
@ 2023-09-17 6:22 ` gb2985 at gmail dot com
2023-09-17 6:37 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: gb2985 at gmail dot com @ 2023-09-17 6:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111437
--- Comment #3 from zxuiji <gb2985 at gmail dot com> ---
(In reply to zxuiji from comment #2)
> (In reply to Andrew Pinski from comment #1)
> > Can you attach the preprocessed source where the warning is and the exact
> > command line you are using to invoke gcc?
> >
> > I suspect the issue is that the function can be overridden due to use of
> > -fPIC or something smilar to that.
>
> Bugzilla wouldn't let me upload it, too big apparently, did it to my google
> drive instead:
> https://drive.google.com/file/d/16NiT5eWvj_B7QTz5E4zlST6sDCS67HWp/
> view?usp=sharing
>
> Found the function at line 12375, still the division I expected, would've
> been shocked had it been otherwise given it's just division of a allocation
> size by an element size
Whoops, mistyped the line, 12735 sorry
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ipa/111437] Some always inline functions are incorrectly warn of as "might not be inlinable"
2023-09-16 21:53 [Bug c/111437] New: Some always inline functions are incorrectly warn of as "might not be inlinable" gb2985 at gmail dot com
` (2 preceding siblings ...)
2023-09-17 6:22 ` gb2985 at gmail dot com
@ 2023-09-17 6:37 ` pinskia at gcc dot gnu.org
2023-09-17 6:47 ` gb2985 at gmail dot com
2023-09-17 8:03 ` schwab@linux-m68k.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-17 6:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111437
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |INVALID
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
One definition has:
__attribute__((hot)) __attribute__((always_inline)) pawd pawmsg_SIGKILL( pawexe
pid )
{ return pawtrigger(
# 127 "/mnt/CODE/gitlab/dragonbuilder/include/paw/pawint/../pawmsg.h" 3 4
((void *)0)
# 127 "/mnt/CODE/gitlab/dragonbuilder/include/paw/pawint/../pawmsg.h"
, PAWMSGID_KILL_NOW, PAWMSG_CLSID_APP, 0, pid ); }
Yes without inline the always_inline might be not be inlinable ...
The preprocessed source is full of issues; redefinitions:
/mnt/CODE/gitlab/dragonbuilder/src/libpaw/pawaio.c:50:28: error: redefinition
of ‘pawabspath_putroot’
In file included from /mnt/CODE/gitlab/dragonbuilder/src/libpaw/libpaw.h:19,
from /mnt/CODE/gitlab/dragonbuilder/src/libpaw/pawaio.c:1:
/mnt/CODE/gitlab/dragonbuilder/include/paw/pawaio.h:554:28: note: previous
definition of ‘pawabspath_putroot’ with type ‘pawjd(pawmbcd *, pawmbctxt,
pawmbctxt)’ {aka ‘long int(pawmbcd *, pawmbc_txt, pawmbc_txt)’}
etc.
But the pattern for the "might not be inlinable" is all the same as what I
mentioned first. There is only always_inline without an inline ...
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ipa/111437] Some always inline functions are incorrectly warn of as "might not be inlinable"
2023-09-16 21:53 [Bug c/111437] New: Some always inline functions are incorrectly warn of as "might not be inlinable" gb2985 at gmail dot com
` (3 preceding siblings ...)
2023-09-17 6:37 ` pinskia at gcc dot gnu.org
@ 2023-09-17 6:47 ` gb2985 at gmail dot com
2023-09-17 8:03 ` schwab@linux-m68k.org
5 siblings, 0 replies; 7+ messages in thread
From: gb2985 at gmail dot com @ 2023-09-17 6:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111437
zxuiji <gb2985 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|INVALID |FIXED
--- Comment #5 from zxuiji <gb2985 at gmail dot com> ---
(In reply to Andrew Pinski from comment #4)
> One definition has:
> __attribute__((hot)) __attribute__((always_inline)) pawd pawmsg_SIGKILL(
> pawexe pid )
> { return pawtrigger(
> # 127 "/mnt/CODE/gitlab/dragonbuilder/include/paw/pawint/../pawmsg.h" 3 4
> ((void *)0)
> # 127 "/mnt/CODE/gitlab/dragonbuilder/include/paw/pawint/../pawmsg.h"
> , PAWMSGID_KILL_NOW, PAWMSG_CLSID_APP, 0, pid ); }
>
> Yes without inline the always_inline might be not be inlinable ...
>
> The preprocessed source is full of issues; redefinitions:
> /mnt/CODE/gitlab/dragonbuilder/src/libpaw/pawaio.c:50:28: error:
> redefinition of ‘pawabspath_putroot’
> In file included from /mnt/CODE/gitlab/dragonbuilder/src/libpaw/libpaw.h:19,
> from /mnt/CODE/gitlab/dragonbuilder/src/libpaw/pawaio.c:1:
> /mnt/CODE/gitlab/dragonbuilder/include/paw/pawaio.h:554:28: note: previous
> definition of ‘pawabspath_putroot’ with type ‘pawjd(pawmbcd *, pawmbctxt,
> pawmbctxt)’ {aka ‘long int(pawmbcd *, pawmbc_txt, pawmbc_txt)’}
>
>
> etc.
>
> But the pattern for the "might not be inlinable" is all the same as what I
> mentioned first. There is only always_inline without an inline ...
You mean I should add __inline to the definition of PAWANT_QCK so it follows
the always_inline attribute? Well that's easy enough however that does beg the
question, why is inline not implicit with the always_inline attribute? That
aside, yeah I'm aware there are issues with the code itself, in the middle of a
redesign and using the compiler to identify where the surface level issues are,
I'll get on the runtime ones after I finish putting together the library and
the unit tests thereafter.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug ipa/111437] Some always inline functions are incorrectly warn of as "might not be inlinable"
2023-09-16 21:53 [Bug c/111437] New: Some always inline functions are incorrectly warn of as "might not be inlinable" gb2985 at gmail dot com
` (4 preceding siblings ...)
2023-09-17 6:47 ` gb2985 at gmail dot com
@ 2023-09-17 8:03 ` schwab@linux-m68k.org
5 siblings, 0 replies; 7+ messages in thread
From: schwab@linux-m68k.org @ 2023-09-17 8:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111437
Andreas Schwab <schwab@linux-m68k.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|FIXED |INVALID
^ permalink raw reply [flat|nested] 7+ messages in thread