tree-optimization/113197 - bougs assert in PTA
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gcc_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gcc_check--master-arm |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_gcc_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gcc_check--master-aarch64 |
success
|
Test passed
|
Commit Message
PTA asserts that EAF_NO_DIRECT_READ is not set when flags are
set consistently which doesn't make sense. The following removes
the assert.
Bootstrap & regtest running on x86_64-unknown-linux-gnu.
Richard.
PR tree-optimization/113197
* tree-ssa-structalias.cc (handle_call_arg): Remove bougs
assert.
* gcc.dg/lto/pr113197_0.c: New testcase.
* gcc.dg/lto/pr113197_1.c: Likewise.
---
gcc/testsuite/gcc.dg/lto/pr113197_0.c | 15 +++++++++++++++
gcc/testsuite/gcc.dg/lto/pr113197_1.c | 3 +++
gcc/tree-ssa-structalias.cc | 1 -
3 files changed, 18 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/gcc.dg/lto/pr113197_0.c
create mode 100644 gcc/testsuite/gcc.dg/lto/pr113197_1.c
new file mode 100644
@@ -0,0 +1,15 @@
+/* { dg-lto-do link } */
+/* { dg-lto-options { { -O -flto -fpie } } } */
+/* { dg-extra-ld-options { -r -nostdlib -flinker-output=nolto-rel } } */
+
+enum a { b } register_dccp();
+void c();
+void __attribute__((noreturn)) exit_error(enum a d) {
+ __builtin_va_list va;
+ __builtin_va_end(va);
+ if (d)
+ c();
+ c();
+ __builtin_exit(1);
+}
+int main() { register_dccp(); }
new file mode 100644
@@ -0,0 +1,3 @@
+int a;
+void exit_error();
+void register_dccp() { exit_error(a); }
@@ -4194,7 +4194,6 @@ handle_call_arg (gcall *stmt, tree arg, vec<ce_s> *results, int flags,
{
make_transitive_closure_constraints (tem);
callarg_transitive = true;
- gcc_checking_assert (!(flags & EAF_NO_DIRECT_READ));
}
/* If necessary, produce varinfo for indirect accesses to ARG. */