Bug 901349 - gcc runs into an internal error if inline assembler, touches zero-sized array.
Summary: gcc runs into an internal error if inline assembler, touches zero-sized array.
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-18 02:51 UTC by Frederik Hertzum
Modified: 2013-08-01 01:00 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-08-01 01:00:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
preprocessed file from failed compilation (465 bytes, text/utf8)
2013-01-18 02:51 UTC, Frederik Hertzum
no flags Details

Description Frederik Hertzum 2013-01-18 02:51:25 UTC
Created attachment 681979 [details]
preprocessed file from failed compilation

Description of problem:
When touching a zero-sized array in inline assembler, GCC runs into an internal compiler error and exits.

Version-Release number of selected component (if applicable):
gcc (GCC) 4.7.2 20120921 (Red Hat 4.7.2-2)


How reproducible:
Always

Steps to Reproduce:
1. compile the following code with gcc
int inline_asm_gcc_bug() {
 int r[0];
 __asm__ volatile ("mov %%eax, %0" : "=" (r) : );
 return r[0];
}

Actual results:
GCC prints:

bug.c: In function 'inline_asm_gcc_bug':
bug.c:3:2: internal compiler error: in emit_move_insn, at expr.c:3435
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccGmoHbL.out file, please attach this to your bugreport.

Expected results:
I would expect GCC to simply tell me that it's not allowed to specify a zero sized array and quit.

Additional info:
This has been tested with the -m32 flag and without the flag on an x86_64 installation with the same result.

Other assembler instructions which uses the zero-sized array will also produce the same result.

Comment 1 Fedora End Of Life 2013-07-03 22:50:28 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Fedora End Of Life 2013-08-01 01:00:41 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


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