public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/52547] New: Internal compiler Error in create_tmp_var in gimplify.c:465
@ 2012-03-09 20:58 iamrohitbanga at gmail dot com
  2012-03-09 21:59 ` [Bug c/52547] " iamrohitbanga at gmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: iamrohitbanga at gmail dot com @ 2012-03-09 20:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52547

             Bug #: 52547
           Summary: Internal compiler Error in create_tmp_var in
                    gimplify.c:465
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: iamrohitbanga@gmail.com


Created attachment 26868
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26868
Preprocessed Source

I get the following error when trying to compile a piece of software.
Commenting out the call to qsort in the original source file (the corresponding
line number in the attached preprocessed file is 7176) does not produce any
error.

gcc -std=gnu9x -fopenmp   -g -O2 -Iinclude -o main main.c src/stinger.c
src/stinger-utils.c src/timer.c src/xmalloc.c \
         -lm -lrt
src/stinger-utils.c: In function ‘stinger_to_sorted_csr’:
src/stinger-utils.c:450:13: internal compiler error: in create_tmp_var, at
gimplify.c:465
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
Preprocessed source stored into /tmp/ccAzPZP8.out file, please attach this to
your bugreport.
make: *** [main] Error 1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug c/52547] Internal compiler Error in create_tmp_var in gimplify.c:465
  2012-03-09 20:58 [Bug c/52547] New: Internal compiler Error in create_tmp_var in gimplify.c:465 iamrohitbanga at gmail dot com
@ 2012-03-09 21:59 ` iamrohitbanga at gmail dot com
  2012-03-12 14:07 ` [Bug middle-end/52547] " rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: iamrohitbanga at gmail dot com @ 2012-03-09 21:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52547

--- Comment #1 from Rohit Banga <iamrohitbanga at gmail dot com> 2012-03-09 21:59:25 UTC ---
Removing -fopenmp resolves the problem. That piece of information should be
helpful in solving the bug.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52547] Internal compiler Error in create_tmp_var in gimplify.c:465
  2012-03-09 20:58 [Bug c/52547] New: Internal compiler Error in create_tmp_var in gimplify.c:465 iamrohitbanga at gmail dot com
  2012-03-09 21:59 ` [Bug c/52547] " iamrohitbanga at gmail dot com
@ 2012-03-12 14:07 ` rguenth at gcc dot gnu.org
  2012-03-15  9:31 ` [Bug middle-end/52547] ICE with openmp with nested function which requires a trampoline pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-03-12 14:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52547

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-03-12
                 CC|                            |jakub at gcc dot gnu.org
     Ever Confirmed|0                           |1
      Known to fail|                            |4.4.0, 4.6.3, 4.7.0

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-12 14:07:03 UTC ---
src/stinger-utils.c:440:7: warning: ISO C forbids nested functions [-pedantic]

so the testcase is probably out-of-scope for OpenMP.  Didn't ever work, so
no regression.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52547] ICE with openmp with nested function which requires a trampoline
  2012-03-09 20:58 [Bug c/52547] New: Internal compiler Error in create_tmp_var in gimplify.c:465 iamrohitbanga at gmail dot com
  2012-03-09 21:59 ` [Bug c/52547] " iamrohitbanga at gmail dot com
  2012-03-12 14:07 ` [Bug middle-end/52547] " rguenth at gcc dot gnu.org
@ 2012-03-15  9:31 ` pinskia at gcc dot gnu.org
  2012-03-15  9:36 ` [Bug middle-end/52547] [4.5/4.6/4.7/4.8 Regression] " pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-03-15  9:31 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52547

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Internal compiler Error in  |ICE with openmp with nested
                   |create_tmp_var in           |function which requires a
                   |gimplify.c:465              |trampoline

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-03-15 09:27:32 UTC ---
Reduced testcase:
stinger_to_sorted_csr ( const int nv )
{
  int * vtxids;
  int i;
#pragma omp parallel for
    for (i = 0; i < nv; ++i) 
    {
      int i64cmp_local (const int *ap)
      {
    return ap - vtxids;
      }
      f (&vtxids[i], i64cmp_local);
    }
}


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52547] [4.5/4.6/4.7/4.8 Regression] ICE with openmp with nested function which requires a trampoline
  2012-03-09 20:58 [Bug c/52547] New: Internal compiler Error in create_tmp_var in gimplify.c:465 iamrohitbanga at gmail dot com
                   ` (2 preceding siblings ...)
  2012-03-15  9:31 ` [Bug middle-end/52547] ICE with openmp with nested function which requires a trampoline pinskia at gcc dot gnu.org
@ 2012-03-15  9:36 ` pinskia at gcc dot gnu.org
  2012-03-22 15:10 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-03-15  9:36 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52547

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.3.5
   Target Milestone|---                         |4.5.4
            Summary|ICE with openmp with nested |[4.5/4.6/4.7/4.8
                   |function which requires a   |Regression] ICE with openmp
                   |trampoline                  |with nested function which
                   |                            |requires a trampoline

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-03-15 09:31:31 UTC ---
This used to work in 4.3.5.  The reason why it worked there is because
__builtin_adjust_trampoline is outside of the "#pragma omp".


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52547] [4.5/4.6/4.7/4.8 Regression] ICE with openmp with nested function which requires a trampoline
  2012-03-09 20:58 [Bug c/52547] New: Internal compiler Error in create_tmp_var in gimplify.c:465 iamrohitbanga at gmail dot com
                   ` (3 preceding siblings ...)
  2012-03-15  9:36 ` [Bug middle-end/52547] [4.5/4.6/4.7/4.8 Regression] " pinskia at gcc dot gnu.org
@ 2012-03-22 15:10 ` jakub at gcc dot gnu.org
  2012-03-22 19:28 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-22 15:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52547

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-22 15:04:00 UTC ---
Created attachment 26957
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26957
gcc47-pr52547.patch

Untested fix.  Note the nested fn in OpenMP is only barely supported, it will
very likely not do what you expect (the nested function will be accessing the
copy of the variables of the function, not the possibly privatized copies of
the omp region (as if all the vars were shared), and e.g. non-local gotos in
them will not even compile.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52547] [4.5/4.6/4.7/4.8 Regression] ICE with openmp with nested function which requires a trampoline
  2012-03-09 20:58 [Bug c/52547] New: Internal compiler Error in create_tmp_var in gimplify.c:465 iamrohitbanga at gmail dot com
                   ` (4 preceding siblings ...)
  2012-03-22 15:10 ` jakub at gcc dot gnu.org
@ 2012-03-22 19:28 ` jakub at gcc dot gnu.org
  2012-03-22 19:44 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-22 19:28 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52547

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-22 19:25:44 UTC ---
Author: jakub
Date: Thu Mar 22 19:25:36 2012
New Revision: 185707

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185707
Log:
    PR middle-end/52547
    * tree-nested.c (convert_tramp_reference_stmt): Call declare_vars
    on any new_local_var_chain vars declared during recursing on
    GIMPLE_OMP_PARALLEL or GIMPLE_OMP_TASK body.

    * testsuite/libgomp.c/pr52547.c: New test.

Added:
    trunk/libgomp/testsuite/libgomp.c/pr52547.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-nested.c
    trunk/libgomp/ChangeLog


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52547] [4.5/4.6/4.7/4.8 Regression] ICE with openmp with nested function which requires a trampoline
  2012-03-09 20:58 [Bug c/52547] New: Internal compiler Error in create_tmp_var in gimplify.c:465 iamrohitbanga at gmail dot com
                   ` (5 preceding siblings ...)
  2012-03-22 19:28 ` jakub at gcc dot gnu.org
@ 2012-03-22 19:44 ` jakub at gcc dot gnu.org
  2012-03-22 20:10 ` [Bug middle-end/52547] [4.5/4.6 " jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-22 19:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52547

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-22 19:28:01 UTC ---
Author: jakub
Date: Thu Mar 22 19:27:52 2012
New Revision: 185708

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185708
Log:
    PR middle-end/52547
    * tree-nested.c (convert_tramp_reference_stmt): Call declare_vars
    on any new_local_var_chain vars declared during recursing on
    GIMPLE_OMP_PARALLEL or GIMPLE_OMP_TASK body.

    * testsuite/libgomp.c/pr52547.c: New test.

Added:
    branches/gcc-4_7-branch/libgomp/testsuite/libgomp.c/pr52547.c
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/tree-nested.c
    branches/gcc-4_7-branch/libgomp/ChangeLog


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52547] [4.5/4.6 Regression] ICE with openmp with nested function which requires a trampoline
  2012-03-09 20:58 [Bug c/52547] New: Internal compiler Error in create_tmp_var in gimplify.c:465 iamrohitbanga at gmail dot com
                   ` (6 preceding siblings ...)
  2012-03-22 19:44 ` jakub at gcc dot gnu.org
@ 2012-03-22 20:10 ` jakub at gcc dot gnu.org
  2012-06-20 13:19 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-22 20:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52547

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.5/4.6/4.7/4.8            |[4.5/4.6 Regression] ICE
                   |Regression] ICE with openmp |with openmp with nested
                   |with nested function which  |function which requires a
                   |requires a trampoline       |trampoline

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-22 19:43:41 UTC ---
Fixed for 4.7.1+ so far.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52547] [4.5/4.6 Regression] ICE with openmp with nested function which requires a trampoline
  2012-03-09 20:58 [Bug c/52547] New: Internal compiler Error in create_tmp_var in gimplify.c:465 iamrohitbanga at gmail dot com
                   ` (7 preceding siblings ...)
  2012-03-22 20:10 ` [Bug middle-end/52547] [4.5/4.6 " jakub at gcc dot gnu.org
@ 2012-06-20 13:19 ` rguenth at gcc dot gnu.org
  2012-07-02 11:16 ` rguenth at gcc dot gnu.org
  2013-04-03 18:16 ` [Bug middle-end/52547] [4.6 " jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-06-20 13:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52547

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52547] [4.5/4.6 Regression] ICE with openmp with nested function which requires a trampoline
  2012-03-09 20:58 [Bug c/52547] New: Internal compiler Error in create_tmp_var in gimplify.c:465 iamrohitbanga at gmail dot com
                   ` (8 preceding siblings ...)
  2012-06-20 13:19 ` rguenth at gcc dot gnu.org
@ 2012-07-02 11:16 ` rguenth at gcc dot gnu.org
  2013-04-03 18:16 ` [Bug middle-end/52547] [4.6 " jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-07-02 11:16 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52547

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.5.4                       |4.6.4

--- Comment #9 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-07-02 11:16:26 UTC ---
The 4.5 branch is being closed, adjusting target milestone.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug middle-end/52547] [4.6 Regression] ICE with openmp with nested function which requires a trampoline
  2012-03-09 20:58 [Bug c/52547] New: Internal compiler Error in create_tmp_var in gimplify.c:465 iamrohitbanga at gmail dot com
                   ` (9 preceding siblings ...)
  2012-07-02 11:16 ` rguenth at gcc dot gnu.org
@ 2013-04-03 18:16 ` jakub at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-03 18:16 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52547

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-03 18:16:22 UTC ---
Author: jakub
Date: Wed Apr  3 17:52:33 2013
New Revision: 197441

URL: http://gcc.gnu.org/viewcvs?rev=197441&root=gcc&view=rev
Log:
    Backported from mainline
    2012-03-22  Jakub Jelinek  <jakub@redhat.com>

    PR middle-end/52547
    * tree-nested.c (convert_tramp_reference_stmt): Call declare_vars
    on any new_local_var_chain vars declared during recursing on
    GIMPLE_OMP_PARALLEL or GIMPLE_OMP_TASK body.

    * testsuite/libgomp.c/pr52547.c: New test.

Added:
    branches/gcc-4_6-branch/libgomp/testsuite/libgomp.c/pr52547.c
Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/tree-nested.c
    branches/gcc-4_6-branch/libgomp/ChangeLog


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-04-03 18:16 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-09 20:58 [Bug c/52547] New: Internal compiler Error in create_tmp_var in gimplify.c:465 iamrohitbanga at gmail dot com
2012-03-09 21:59 ` [Bug c/52547] " iamrohitbanga at gmail dot com
2012-03-12 14:07 ` [Bug middle-end/52547] " rguenth at gcc dot gnu.org
2012-03-15  9:31 ` [Bug middle-end/52547] ICE with openmp with nested function which requires a trampoline pinskia at gcc dot gnu.org
2012-03-15  9:36 ` [Bug middle-end/52547] [4.5/4.6/4.7/4.8 Regression] " pinskia at gcc dot gnu.org
2012-03-22 15:10 ` jakub at gcc dot gnu.org
2012-03-22 19:28 ` jakub at gcc dot gnu.org
2012-03-22 19:44 ` jakub at gcc dot gnu.org
2012-03-22 20:10 ` [Bug middle-end/52547] [4.5/4.6 " jakub at gcc dot gnu.org
2012-06-20 13:19 ` rguenth at gcc dot gnu.org
2012-07-02 11:16 ` rguenth at gcc dot gnu.org
2013-04-03 18:16 ` [Bug middle-end/52547] [4.6 " jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).