Bug 2228600

Summary: gcc -fanalyzer internal compiler error
Product: [Fedora] Fedora Reporter: Peter Jones <pjones>
Component: gccAssignee: Dave Malcolm <dmalcolm>
Status: ASSIGNED --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 38CC: dmalcolm, fweimer, jakub, jlaw, jwakely, mcermak, mpolacek, msebor, nickc, sipoyare
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
the /tmp/ccXXXXXX.out file gcc told me to attach none

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.