[Bug middle-end/112499] [11/12/13/14 Regression] ICE in output_operand: invalid expression as operand with addition of 2 differences of address of labels
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112499 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE Status|NEW |RESOLVED --- Comment #5 from Andrew Pinski --- Dup. *** This bug has been marked as a duplicate of bug 100595 ***
[Bug middle-end/112499] [11/12/13/14 Regression] ICE in output_operand: invalid expression as operand with addition of 2 differences of address of labels
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112499 --- Comment #4 from Jakub Jelinek --- Or consider typedef unsigned __INTPTR_TYPE__ uintptr_t; volatile int v; int foo (int x) { static uintptr_t a = ((char *)& - (char *)&) + ((char *)& - (char *)&) + ((char *)& - (char *)&); void *b[] = { &, &, &, &, &, & }; l1: ++v; l2: ++v; l3: ++v; l4: ++v; l5: ++v; l6: ++v; if (x >= 0 && x <= 5) { x += 42; goto *b[x - 42]; } return a; } That is even older. r0-79351-g7771bb621aad43c7d0e21ccec4922dd3beac9cb6 still used to reject that: error: initializer element is not computable at load time r0-79390-g7ffb5e78794b6d8f8094d7c928e6f0e94b62cad6 already accepts but assembler doesn't handle that: pr112499-2.s:58: Error: invalid operands (*ABS* and .text sections) for `-' pr112499-2.s:58: Error: invalid operands (*ABS* and .text sections) for `-' pr112499-2.s:58: Error: invalid operands (.text and .text sections) for `+' .quad .L3-.L6-.L4-.L2+.L7+.L5 Guess we can only accept a subtraction of 2 labels, not addition of 2 labels or something more complex.
[Bug middle-end/112499] [11/12/13/14 Regression] ICE in output_operand: invalid expression as operand with addition of 2 differences of address of labels
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112499 Jakub Jelinek changed: What|Removed |Added Priority|P1 |P2 --- Comment #3 from Jakub Jelinek --- GCC 6-13 has been released with this bug, so P2.
[Bug middle-end/112499] [11/12/13/14 Regression] ICE in output_operand: invalid expression as operand with addition of 2 differences of address of labels
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112499 Jeffrey A. Law changed: What|Removed |Added Priority|P3 |P1 CC||law at gcc dot gnu.org
[Bug middle-end/112499] [11/12/13/14 Regression] ICE in output_operand: invalid expression as operand with addition of 2 differences of address of labels
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112499 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org Keywords|needs-bisection | --- Comment #2 from Jakub Jelinek --- Started with r6-3469-gef537cc859dd149230454398078da6d3128cfd9a Testcase without headers: typedef unsigned __INTPTR_TYPE__ uintptr_t; int foo (void) { static uintptr_t a = ((char *)& - (char *)&) + ((char *)& - (char *)&); l1: l2: l3: return a; }
[Bug middle-end/112499] [11/12/13/14 Regression] ICE in output_operand: invalid expression as operand with addition of 2 differences of address of labels
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112499 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2023-11-13 Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski --- Confirmed.
[Bug middle-end/112499] [11/12/13/14 Regression] ICE in output_operand: invalid expression as operand with addition of 2 differences of address of labels
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112499 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |11.5 Known to fail||5.3.0, 5.5.0, 6.1.0 Known to work||4.9.4, 5.2.0 Component|c |middle-end Summary|GCC: 14: internal compiler |[11/12/13/14 Regression] |error: output_operand: |ICE in output_operand: |invalid expression as |invalid expression as |operand |operand with addition of 2 ||differences of address of ||labels Keywords||ice-on-invalid-code