Bug 2228600 - gcc -fanalyzer internal compiler error
Summary: gcc -fanalyzer internal compiler error
Keywords:
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 38
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Dave Malcolm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-02 20:05 UTC by Peter Jones
Modified: 2023-08-08 18:10 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)
the /tmp/ccXXXXXX.out file gcc told me to attach (209.49 KB, text/plain)
2023-08-02 20:06 UTC, Peter Jones
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 110882 0 P3 ASSIGNED ICE with -fanalyzer on zero-sized array 2023-08-02 22:25:47 UTC

Description Peter Jones 2023-08-02 20:05:14 UTC
During a pass with "gcc -fanalyzer", gcc told me to file a bug:

gcc -std=gnu11 -ggdb -ffreestanding -fmacro-prefix-map=/home/pjones/devel/github.com/shim/gcc-fanalyzer/= -fno-stack-protector -fno-strict-aliasing -fpic -fshort-wchar -fanalyzer -Os -Wall -Wextra -Wno-missing-field-initializers  -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args  -m64 -DMDE_CPU_X64 -DPAGE_SIZE=4096 -Werror=analyzer-null-dereference -nostdinc -I/home/pjones/devel/github.com/shim/gcc-fanalyzer/Cryptlib -I/home/pjones/devel/github.com/shim/gcc-fanalyzer/Cryptlib/Include -I/home/pjones/devel/github.com/shim/gcc-fanalyzer/gnu-efi/inc -I/home/pjones/devel/github.com/shim/gcc-fanalyzer/gnu-efi/inc/x86_64 -I/home/pjones/devel/github.com/shim/gcc-fanalyzer/gnu-efi/inc/protocol -I/home/pjones/devel/github.com/shim/gcc-fanalyzer/include -iquote /home/pjones/devel/github.com/shim/gcc-fanalyzer -iquote /home/pjones/devel/github.com/shim/gcc-fanalyzer -isystem /home/pjones/devel/github.com/shim/gcc-fanalyzer/include/system -isystem /usr/lib/gcc/x86_64-redhat-linux/13/include -DDEFAULT_LOADER='L"\\\\grubx64.efi"' -DDEFAULT_LOADER_CHAR='"\\\\grubx64.efi"' -DEFI_ARCH='L"x64"' -DDEBUGDIR='L"/usr/lib/debug/usr/share/shim/x64-15.7/"'   -c -o csv.o csv.c
during IPA pass: analyzer
csv.c: In function ‘parse_csv_line’:
csv.c:30:36: internal compiler error: in make, at analyzer/store.cc:132
   30 |                         columns[n] = NULL;
      |                                    ^
Please submit a full bug report, with preprocessed source.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccyJ6wGT.out file, please attach this to your bugreport.
make: *** [<builtin>: csv.o] Error 1

Reproducible: Always

Steps to Reproduce:
1. run gcc with the command line shown in the attached file
2. gcc tells me to file a bug
Actual Results:  
gcc tells me about its bugs

Expected Results:  
gcc tells me about my bugs

Comment 1 Peter Jones 2023-08-02 20:06:08 UTC
Created attachment 1981362 [details]
the /tmp/ccXXXXXX.out file gcc told me to attach

Comment 2 Dave Malcolm 2023-08-02 21:21:42 UTC
Thanks for filing this bug.

I can reproduce the crash with GCC trunk; I'm investigating.

Comment 3 Dave Malcolm 2023-08-02 22:25:48 UTC
Filed upstream as https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110882

Comment 4 Peter Jones 2023-08-08 18:10:50 UTC
FYI, I've done a test build locally of your upstream patch, and it works for me.


Note You need to log in before you can comment on or make changes to this bug.