* [Bug c/103961] gcc-12 apparently miscompiles libcap's cap_to_text() function
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
@ 2022-01-10 12:34 ` manuel.lauss at googlemail dot com
2022-01-10 12:34 ` manuel.lauss at googlemail dot com
` (19 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: manuel.lauss at googlemail dot com @ 2022-01-10 12:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
--- Comment #1 from Manuel Lauss <manuel.lauss at googlemail dot com> ---
Created attachment 52153
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52153&action=edit
gcc-11.3 output
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug c/103961] gcc-12 apparently miscompiles libcap's cap_to_text() function
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
2022-01-10 12:34 ` [Bug c/103961] " manuel.lauss at googlemail dot com
@ 2022-01-10 12:34 ` manuel.lauss at googlemail dot com
2022-01-10 12:50 ` [Bug middle-end/103961] [12 Regression] " pinskia at gcc dot gnu.org
` (18 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: manuel.lauss at googlemail dot com @ 2022-01-10 12:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
--- Comment #2 from Manuel Lauss <manuel.lauss at googlemail dot com> ---
Created attachment 52154
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52154&action=edit
gcc-12.0 output
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug middle-end/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
2022-01-10 12:34 ` [Bug c/103961] " manuel.lauss at googlemail dot com
2022-01-10 12:34 ` manuel.lauss at googlemail dot com
@ 2022-01-10 12:50 ` pinskia at gcc dot gnu.org
2022-01-10 13:06 ` pinskia at gcc dot gnu.org
` (17 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-10 12:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug middle-end/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
` (2 preceding siblings ...)
2022-01-10 12:50 ` [Bug middle-end/103961] [12 Regression] " pinskia at gcc dot gnu.org
@ 2022-01-10 13:06 ` pinskia at gcc dot gnu.org
2022-01-10 13:11 ` pinskia at gcc dot gnu.org
` (16 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-10 13:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-01-10
Ever confirmed|0 |1
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Looks like GCC is getting confused due to:
p--;
I don't get:
[cap_text.c:419:3] # PT = anything
_104 = p_65 + 18446744073709551615;
All other places just have # PT = { D.4523 } (escaped)
D.4523 being buf decl.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug middle-end/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
` (3 preceding siblings ...)
2022-01-10 13:06 ` pinskia at gcc dot gnu.org
@ 2022-01-10 13:11 ` pinskia at gcc dot gnu.org
2022-01-10 13:12 ` pinskia at gcc dot gnu.org
` (15 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-10 13:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
There is a bogus warning too:
cap_text.c:431:11: warning: '%c' directive writing 1 byte into a region of size
0 [-Wformat-overflow=]
In file included from /usr/include/stdio.h:894,
from cap_text.c:13:
In function 'sprintf',
inlined from 'cap_to_text' at cap_text.c:431:11:
/usr/include/bits/stdio2.h:38:10: note: '__builtin___sprintf_chk' output
between 2 and 5 bytes into a destination of size 0
And the gimple looks wrong:
_164 = __sprintf_chkD.1304 (p_141, 1, 0, [cap_text.c:431:11] "%c%s%s%s", _31,
iftmp.56_86, iftmp.55_85, iftmp.54_84);
For GCC 11 we had:
_164 = __sprintf_chkD.1270 (p_141, 1, 18446744073709551615,
[cap_text.c:431:11] "%c%s%s%s", _33, iftmp.56_90, iftmp.55_89, iftmp.54_88);
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug middle-end/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
` (4 preceding siblings ...)
2022-01-10 13:11 ` pinskia at gcc dot gnu.org
@ 2022-01-10 13:12 ` pinskia at gcc dot gnu.org
2022-01-10 13:14 ` pinskia at gcc dot gnu.org
` (14 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-10 13:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|alias |needs-bisection,
| |needs-reduction
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I will try a reduction maybe over the weekend if nobody gets to it before me.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug middle-end/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
` (5 preceding siblings ...)
2022-01-10 13:12 ` pinskia at gcc dot gnu.org
@ 2022-01-10 13:14 ` pinskia at gcc dot gnu.org
2022-01-10 13:19 ` [Bug tree-optimization/103961] " pinskia at gcc dot gnu.org
` (13 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-10 13:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note it is even wrong at -O1 -fno-thread-jumps .
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
` (6 preceding siblings ...)
2022-01-10 13:14 ` pinskia at gcc dot gnu.org
@ 2022-01-10 13:19 ` pinskia at gcc dot gnu.org
2022-01-10 13:35 ` rguenth at gcc dot gnu.org
` (12 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-10 13:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|middle-end |tree-optimization
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
objsz1 produces:
Computing maximum subobject size for p_61:
Visiting use-def links for p_61
Visiting use-def links for p_139
Visiting use-def links for p_64
Visiting use-def links for p_29
Visiting use-def links for p_63
Visiting use-def links for p_62
Visiting use-def links for p_141
Found a dependency loop at p_61
Need to reexamine p_141
Visiting use-def links for p_144
Visiting use-def links for p_141
Reexamining p_141
p_141: maximum subobject size 0
Simplified
[/usr/include/bits/stdio2.h:38:10] _161 = __builtin_object_sizeD.1280 (p_61,
1);
to 18446744073709551615
Simplified
[/usr/include/bits/stdio2.h:38:10] _163 = __builtin_object_sizeD.1280 (p_141,
1);
to 0
Simplified
[/usr/include/bits/stdio2.h:38:10] _165 = __builtin_object_sizeD.1280 (p_62,
1);
to 18446744073709551615
Computing maximum subobject size for p_66:
Visiting use-def links for p_66
Visiting use-def links for p_123
Visiting use-def links for p_67
Visiting use-def links for p_136
Visiting use-def links for p_126
Simplified
[/usr/include/bits/stdio2.h:38:10] _168 = __builtin_object_sizeD.1280 (p_66,
1);
to 18446744073709551615
Computing maximum subobject size for p_125:
Visiting use-def links for p_125
Simplified
[/usr/include/bits/stdio2.h:38:10] _170 = __builtin_object_sizeD.1280 (p_125,
1);
to 18446744073709551615
The 0 for _163/p_141 is wrong.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
` (7 preceding siblings ...)
2022-01-10 13:19 ` [Bug tree-optimization/103961] " pinskia at gcc dot gnu.org
@ 2022-01-10 13:35 ` rguenth at gcc dot gnu.org
2022-01-11 2:02 ` pinskia at gcc dot gnu.org
` (11 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-10 13:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> Looks like GCC is getting confused due to:
> p--;
>
>
> I don't get:
> [cap_text.c:419:3] # PT = anything
> _104 = p_65 + 18446744073709551615;
>
> All other places just have # PT = { D.4523 } (escaped)
>
> D.4523 being buf decl.
I think that might be ranger adding nonnull to a pointer where we previously
have no points-to info at all (which means anything as well). The above
stmt is introduced by PRE:
- <bb 81> [local count: 982087419]:
- goto <bb 21>; [100.00%]
+ <bb 94> [local count: 982087419]:
+ goto <bb 23>; [100.00%]
+
+ <bb 29> [local count: 37309945]:
+ [cap_text.c:419:3] _104 = p_65 + 18446744073709551615;
- <bb 27> [local count: 39298952]:
+ <bb 30> [local count: 39298952]:
# PT = { D.4523 } (escaped)
- # p_228 = PHI <p_65(26), [cap_text.c:403:4] p_147(20)>
- [cap_text.c:419:3] # PT = { D.4523 } (escaped)
- p_149 = p_228 + 18446744073709551615;
+ # p_228 = PHI <p_65(29), [cap_text.c:403:4] p_147(91)>
+ # PT = { D.4523 } (escaped)
+ # prephitmp_82 = PHI <_104(29), p_210(91)>
which could indeed have preserved points-to info (but it would need to be
tracked in the expression sets so that's not too easy).
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
` (8 preceding siblings ...)
2022-01-10 13:35 ` rguenth at gcc dot gnu.org
@ 2022-01-11 2:02 ` pinskia at gcc dot gnu.org
2022-01-11 2:12 ` pinskia at gcc dot gnu.org
` (10 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-11 2:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|needs-reduction |
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase:
extern __inline
__attribute__ ((__gnu_inline__))
int
sprintf (char *__restrict __s, const char *__restrict __fmt, ...) {
return __builtin___sprintf_chk (__s, 2 - 1, __builtin_object_size (__s, 2 > 1),
__fmt, __builtin_va_arg_pack ());
}
void cap_to_text(int cmb)
{
char buf[(23 * ((2) * 32))+100];
char *p;
int n, t;
p = 20 + buf;
for (t = 8; t--; )
{
for (n = 0; n < cmb; n++)
p += sprintf(p, "a,");
p--;
sprintf(p, "+");
}
}
When p-- happens, it will always be buf+somesmallvalue.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
` (9 preceding siblings ...)
2022-01-11 2:02 ` pinskia at gcc dot gnu.org
@ 2022-01-11 2:12 ` pinskia at gcc dot gnu.org
2022-01-11 2:13 ` pinskia at gcc dot gnu.org
` (9 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-11 2:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #9)
> Reduced testcase:
Note this is -O1 -Wall.
This is definitely a change in objsz which is calculating the size wrong.
We get:
<source>: In function 'cap_to_text':
<source>:18:29: warning: '+' directive writing 1 byte into a region of size 0
[-Wformat-overflow=]
18 | sprintf(p, "+");
| ^
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
` (10 preceding siblings ...)
2022-01-11 2:12 ` pinskia at gcc dot gnu.org
@ 2022-01-11 2:13 ` pinskia at gcc dot gnu.org
2022-01-11 9:10 ` [Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function since r12-6030-g422f9eb7011b76c1 marxin at gcc dot gnu.org
` (8 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-11 2:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |blocker
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function since r12-6030-g422f9eb7011b76c1
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
` (11 preceding siblings ...)
2022-01-11 2:13 ` pinskia at gcc dot gnu.org
@ 2022-01-11 9:10 ` marxin at gcc dot gnu.org
2022-01-11 9:18 ` marxin at gcc dot gnu.org
` (7 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-11 9:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |siddhesh at gcc dot gnu.org
Summary|[12 Regression] gcc-12 |[12 Regression] gcc-12
|apparently miscompiles |apparently miscompiles
|libcap's cap_to_text() |libcap's cap_to_text()
|function |function since
| |r12-6030-g422f9eb7011b76c1
Keywords|needs-bisection |
--- Comment #11 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-6030-g422f9eb7011b76c1.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function since r12-6030-g422f9eb7011b76c1
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
` (12 preceding siblings ...)
2022-01-11 9:10 ` [Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function since r12-6030-g422f9eb7011b76c1 marxin at gcc dot gnu.org
@ 2022-01-11 9:18 ` marxin at gcc dot gnu.org
2022-01-11 9:27 ` jakub at gcc dot gnu.org
` (6 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-11 9:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
--- Comment #12 from Martin Liška <marxin at gcc dot gnu.org> ---
Self-contained test-case:
extern __inline __attribute__((__gnu_inline__)) int sprintf(
char *__restrict __s, const char *__restrict __fmt, ...) {
return __builtin___sprintf_chk(__s, 2 - 1, __builtin_object_size(__s, 2 > 1),
__fmt, __builtin_va_arg_pack());
}
int main() {
char buf[16];
char *p = buf;
for (int t = 0; t < 1; t++) {
for (int n = 0; n < 1; n++) p += sprintf(p, "a,");
p--;
sprintf(p, "+");
}
__builtin_printf("buf: %s\n", buf);
if (buf[0] != 'a') __builtin_abort();
return 0;
}
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function since r12-6030-g422f9eb7011b76c1
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
` (13 preceding siblings ...)
2022-01-11 9:18 ` marxin at gcc dot gnu.org
@ 2022-01-11 9:27 ` jakub at gcc dot gnu.org
2022-01-11 9:35 ` siddhesh at gcc dot gnu.org
` (5 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-01-11 9:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Testcase with nicer formatting:
extern inline __attribute__ ((__gnu_inline__)) int
sprintf (char *restrict s, const char *restrict fmt, ...)
{
return __builtin___sprintf_chk (s, 1, __builtin_object_size (s, 2 > 1),
fmt, __builtin_va_arg_pack ());
}
void
cap_to_text (int c)
{
char buf[1572];
char *p;
int n, t;
p = 20 + buf;
for (t = 8; t--; )
{
for (n = 0; n < c; n++)
p += sprintf (p, "a,");
p--;
sprintf (p, "+");
}
}
Indeed, early_objsz already inserts the bogus:
p_16 = p_3 + 18446744073709551615;
_17 = __builtin_object_size (p_16, 1);
_24 = MIN_EXPR <_17, 0>;
_25 = __builtin___sprintf_chk (p_16, 1, _24, "+");
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function since r12-6030-g422f9eb7011b76c1
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
` (14 preceding siblings ...)
2022-01-11 9:27 ` jakub at gcc dot gnu.org
@ 2022-01-11 9:35 ` siddhesh at gcc dot gnu.org
2022-01-11 13:00 ` rguenth at gcc dot gnu.org
` (4 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: siddhesh at gcc dot gnu.org @ 2022-01-11 9:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |siddhesh at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #14 from Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> ---
Looking into it.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function since r12-6030-g422f9eb7011b76c1
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
` (15 preceding siblings ...)
2022-01-11 9:35 ` siddhesh at gcc dot gnu.org
@ 2022-01-11 13:00 ` rguenth at gcc dot gnu.org
2022-01-11 14:48 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-11 13:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function since r12-6030-g422f9eb7011b76c1
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
` (16 preceding siblings ...)
2022-01-11 13:00 ` rguenth at gcc dot gnu.org
@ 2022-01-11 14:48 ` cvs-commit at gcc dot gnu.org
2022-01-11 14:52 ` siddhesh at gcc dot gnu.org
` (2 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-11 14:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Siddhesh Poyarekar
<siddhesh@gcc.gnu.org>:
https://gcc.gnu.org/g:026d44cbbd42653908f9faf6b80773f03e1bb1a0
commit r12-6478-g026d44cbbd42653908f9faf6b80773f03e1bb1a0
Author: Siddhesh Poyarekar <siddhesh@gotplt.org>
Date: Tue Jan 11 16:07:29 2022 +0530
tree-optimization/103961: Never compute offset for -1 size
Never try to compute size for offset when the object size is -1, which
is either unknown maximum or uninitialized minimum irrespective of the
osi->pass number.
gcc/ChangeLog:
PR tree-optimization/103961
* tree-object-size.c (plus_stmt_object_size): Always avoid
computing offset for -1 size.
gcc/testsuite/ChangeLog:
PR tree-optimization/103961
* gcc.dg/pr103961.c: New test case.
Co-authored-by: Jakub Jelinek <jakub@redhat.com>
Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function since r12-6030-g422f9eb7011b76c1
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
` (17 preceding siblings ...)
2022-01-11 14:48 ` cvs-commit at gcc dot gnu.org
@ 2022-01-11 14:52 ` siddhesh at gcc dot gnu.org
2022-01-11 16:11 ` manuel.lauss at googlemail dot com
2022-01-11 16:20 ` jakub at gcc dot gnu.org
20 siblings, 0 replies; 22+ messages in thread
From: siddhesh at gcc dot gnu.org @ 2022-01-11 14:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
--- Comment #16 from Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> ---
Should be fixed with that patch. May I close this or wait for confirmation
from the reporter?
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function since r12-6030-g422f9eb7011b76c1
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
` (18 preceding siblings ...)
2022-01-11 14:52 ` siddhesh at gcc dot gnu.org
@ 2022-01-11 16:11 ` manuel.lauss at googlemail dot com
2022-01-11 16:20 ` jakub at gcc dot gnu.org
20 siblings, 0 replies; 22+ messages in thread
From: manuel.lauss at googlemail dot com @ 2022-01-11 16:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
--- Comment #17 from Manuel Lauss <manuel.lauss at googlemail dot com> ---
(In reply to Siddhesh Poyarekar from comment #16)
> Should be fixed with that patch. May I close this or wait for confirmation
> from the reporter?
I can no longer reproduce the original issue.
^ permalink raw reply [flat|nested] 22+ messages in thread
* [Bug tree-optimization/103961] [12 Regression] gcc-12 apparently miscompiles libcap's cap_to_text() function since r12-6030-g422f9eb7011b76c1
2022-01-10 12:33 [Bug c/103961] New: gcc-12 apparently miscompiles libcap's cap_to_text() function manuel.lauss at googlemail dot com
` (19 preceding siblings ...)
2022-01-11 16:11 ` manuel.lauss at googlemail dot com
@ 2022-01-11 16:20 ` jakub at gcc dot gnu.org
20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-01-11 16:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103961
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
CC| |jakub at gcc dot gnu.org
Resolution|--- |FIXED
--- Comment #18 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed then.
^ permalink raw reply [flat|nested] 22+ messages in thread