【标题描述】x86架构上生成的过程或目标文件中找不到预期目标字段
一、缺陷信息
【环境信息】
软件信息
使用内建 specs。
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-linux-gnu/10.3.1/lto-wrapper
目标:x86_64-linux-gnu
配置为:../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,fortran,objc,obj-c++,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl --without-cloog --enable-gnu-indirect-function --build=x86_64-linux-gnu --with-stage1-ldflags=' -Wl,-z,relro,-z,now' --with-boot-ldflags=' -Wl,-z,relro,-z,now' --disable-bootstrap --with-tune=generic --with-arch_32=x86-64 --disable-multilib
线程模型:posix
Supported LTO compression algorithms: zlib
gcc 版本 10.3.1 (GCC)
【问题复现步骤】
1.用例pr45416.c
gcc ./gcc.dg/pr45416.c -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers -fdiagnostics-color=never -fdiagnostics-urls=never -O2 -ffat-lto-objects -fno-ident -S -o pr45416.s
grep "andl" pr45416.s
grep "setne" pr45416.s
2.用例pr65871-3.c
gcc ./gcc.target/i386/pr65871-3.c -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers -fdiagnostics-color=never -fdiagnostics-urls=never -O2 -mbmi -ffat-lto-objects -fno-ident -S -o pr65871-3.s
grep "test" pr65871-3.s
3.用例pr99305.C
g++ ./g++.dg/opt/pr99305.C -fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers -fdiagnostics-color=never -fdiagnostics-urls=never -fmessage-length=0 -std=gnu++98 -O3 -fno-ipa-icf -fdump-tree-optimized -S -o pr99305.s
grep "= [^\n\r]* <= 9" pr99305.C.241t.optimized
grep "if (c" pr99305.C.241t.optimized
grep " = PHI <" pr99305.C.241t.optimized
【实际结果】
1.用例pr45416.c需要扫描出“andl”,实际未扫描到;不需要扫描到“setne”,实际扫描到
2.用例pr65871-3.c不需要扫描到,实际扫描到
3.用例r99305.C(3个扫描失败:a.需要扫描到3次,实际扫描到2次;b.不需要扫描到,实际扫描到;c.不需要扫描到,实际扫描到
【其他相关附件信息】
比如系统message日志/组件日志、dump信息、图片等
缺陷详情参考链接:
缺陷分析指导链接:
https:xxx
Hi jixiaohuiyou, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Compiler, and any of the maintainers: @Noah , @eastb233 , @kuen , @Peilin Guo , @编译小伙 , @huangxiaoquan , @cf-zhao , @周磊 , @stubCode , @dingguangya , @Haijian.Zhang
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
22.03-LTS-SP2 rc1 转测repo,三个用例都成功通过:
22.03-LTS-SP2 rc2 转测repo,三个用例报错同issue:
经二分,引入问题的PR为:https://gitee.com/openeuler/gcc/pulls/80
尝试本地复现:基于112环境
构建出错:
出错原因是当前112是arm环境, 需要一个x86环境来复现问题 ,当前arm的构建配置
编译器构建成功,基于src-源码仓库
切换为 openEuler-22.03-LTS-SP3 分支
3个用例加上-ftree-fold-phiopt选项后,测试通过:
登录 后才可以发表评论