public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/108002] New: Throwing exception when compiling third-parties(ZSTD) libraries with optimization option
@ 2022-12-07  3:01 pefy19950714 at gmail dot com
  2022-12-07  3:04 ` [Bug tree-optimization/108002] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: pefy19950714 at gmail dot com @ 2022-12-07  3:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108002

            Bug ID: 108002
           Summary: Throwing exception when compiling third-parties(ZSTD)
                    libraries with optimization option
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pefy19950714 at gmail dot com
  Target Milestone: ---

I got below exception when I was compiling zstd libraries with any g++
optimization options(O1, O2, O3, etc).
But, the compilation can be passed if I remove the optimization option.
-------------------------
.//src/extern/zstd/src/zstd.c: In function ‘ZSTD_bounds 
ZSTD_cParam_getBounds(ZSTD_cParameter)’:
.//src/extern/zstd/src/zstd.c:18062: internal compiler error: in tree_nrv, at
tree-nrv.c:143
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

-------------------------

There are some required information for your reference with gcc -v.
We are using redhat-release-5Client-5.9.0.2.

-------------------------

Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../gcc-4.4.3/configure --prefix=/mu/dev/gcc/4.4.3-rhel5-64
--with-local-prefix=/mu/mtsdk/corplib/gcc443-rhel5-64 --with-as=/mu/bin/gas
--with-ar=/mu/bin/gar --with-ld=/mu/bin/gld --with-nm=/mu/bin/gnm
--enable-bootstrap --enable-targets=x86_64,i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.3 (GCC)

-------------------------

The command we used to compile zstd lib:
g++ -O3 zstd.c -c -o zstd.o

-------------------------

ZSTD lib can be downloaded from here: 
https://github.com/facebook/zstd

-------------------------
Thanks for your help, and hope I can get the updates soon!

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

* [Bug tree-optimization/108002] Throwing exception when compiling third-parties(ZSTD) libraries with optimization option
  2022-12-07  3:01 [Bug c/108002] New: Throwing exception when compiling third-parties(ZSTD) libraries with optimization option pefy19950714 at gmail dot com
@ 2022-12-07  3:04 ` pinskia at gcc dot gnu.org
  2022-12-07  3:08 ` pefy19950714 at gmail dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-07  3:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108002

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
4.4.3 is over 12 years old now. Is there any way to move to something newer?

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

* [Bug tree-optimization/108002] Throwing exception when compiling third-parties(ZSTD) libraries with optimization option
  2022-12-07  3:01 [Bug c/108002] New: Throwing exception when compiling third-parties(ZSTD) libraries with optimization option pefy19950714 at gmail dot com
  2022-12-07  3:04 ` [Bug tree-optimization/108002] " pinskia at gcc dot gnu.org
@ 2022-12-07  3:08 ` pefy19950714 at gmail dot com
  2022-12-07  3:19 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pefy19950714 at gmail dot com @ 2022-12-07  3:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108002

--- Comment #2 from Grant Li <pefy19950714 at gmail dot com> ---
(In reply to Andrew Pinski from comment #1)
> 4.4.3 is over 12 years old now. Is there any way to move to something newer?

I already tried gcc 4.4.7 and 4.4.4... but also had same error.
We need to compatible gcc with our RHEL5 environment, so it is the reason why I
can't move to more higher gcc version.
Can I know is it a known issue or is it fixed on any higher gcc version?

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

* [Bug tree-optimization/108002] Throwing exception when compiling third-parties(ZSTD) libraries with optimization option
  2022-12-07  3:01 [Bug c/108002] New: Throwing exception when compiling third-parties(ZSTD) libraries with optimization option pefy19950714 at gmail dot com
  2022-12-07  3:04 ` [Bug tree-optimization/108002] " pinskia at gcc dot gnu.org
  2022-12-07  3:08 ` pefy19950714 at gmail dot com
@ 2022-12-07  3:19 ` pinskia at gcc dot gnu.org
  2022-12-07  3:32 ` pefy19950714 at gmail dot com
  2022-12-07  7:01 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-07  3:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108002

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=50602,
                   |                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=47011
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
#  pragma GCC optimize("-O2")

The bugs that related to this pragma were fixed in GCC 4.8.0 (a few were fixed
before).
There were many changes that helped fix it.
You could always build a newer GCC yourself but with an over 10 year release is
not going to be really supported.
There is nothing GCC bug report can do to help you.

RHEL5 is just not supported.

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

* [Bug tree-optimization/108002] Throwing exception when compiling third-parties(ZSTD) libraries with optimization option
  2022-12-07  3:01 [Bug c/108002] New: Throwing exception when compiling third-parties(ZSTD) libraries with optimization option pefy19950714 at gmail dot com
                   ` (2 preceding siblings ...)
  2022-12-07  3:19 ` pinskia at gcc dot gnu.org
@ 2022-12-07  3:32 ` pefy19950714 at gmail dot com
  2022-12-07  7:01 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pefy19950714 at gmail dot com @ 2022-12-07  3:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108002

--- Comment #4 from Grant Li <pefy19950714 at gmail dot com> ---
(In reply to Andrew Pinski from comment #3)
> #  pragma GCC optimize("-O2")
> 
> The bugs that related to this pragma were fixed in GCC 4.8.0 (a few were
> fixed before).
> There were many changes that helped fix it.
> You could always build a newer GCC yourself but with an over 10 year release
> is not going to be really supported.
> There is nothing GCC bug report can do to help you.
> 
> RHEL5 is just not supported.

Thanks! I will discuss it with my team, appreciate your prompt reply.

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

* [Bug tree-optimization/108002] Throwing exception when compiling third-parties(ZSTD) libraries with optimization option
  2022-12-07  3:01 [Bug c/108002] New: Throwing exception when compiling third-parties(ZSTD) libraries with optimization option pefy19950714 at gmail dot com
                   ` (3 preceding siblings ...)
  2022-12-07  3:32 ` pefy19950714 at gmail dot com
@ 2022-12-07  7:01 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-12-07  7:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108002

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Btw, you can always try to bisect what GCC change fixed the issue and try
backporting this yourself.

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

end of thread, other threads:[~2022-12-07  7:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-07  3:01 [Bug c/108002] New: Throwing exception when compiling third-parties(ZSTD) libraries with optimization option pefy19950714 at gmail dot com
2022-12-07  3:04 ` [Bug tree-optimization/108002] " pinskia at gcc dot gnu.org
2022-12-07  3:08 ` pefy19950714 at gmail dot com
2022-12-07  3:19 ` pinskia at gcc dot gnu.org
2022-12-07  3:32 ` pefy19950714 at gmail dot com
2022-12-07  7:01 ` rguenth 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).