Can we have a product X which gets both a copyright & a patent?


I'm particularly interested in the case of Software since its content overlaps with both Copyright & Patent. But someone told me that the same subject matter cannot be protected under different IPRs (Copyright & Patent). 
So, Pure Software is protected by Copyright and Software with a Technical Component is protected by Patent.


I'm trying to figure out if the TRIPS agreement places any such rule (same subject matter cannot be protected under different IPRs).



Any rule in the TRIPS agreement which prohibits same subject matter to be protected by different IPRs?